[
https://issues.apache.org/jira/browse/GROOVY-11513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17947532#comment-17947532
]
Eric Milles edited comment on GROOVY-11513 at 4/26/25 3:39 PM:
---------------------------------------------------------------
I am neither for or against. I created the PR so the OP could host discussion
or start voting separate from mechanics of implementation.
was (Author: emilles):
I am neither for or against. I created the PR so the OP could gave discussion
or start voting separate from mechanics of implementation.
> java.time.* should be imported automatically
> --------------------------------------------
>
> Key: GROOVY-11513
> URL: https://issues.apache.org/jira/browse/GROOVY-11513
> Project: Groovy
> Issue Type: Improvement
> Components: Compiler
> Affects Versions: 4.0.23
> Reporter: Scott Murphy Heiberg
> Assignee: Eric Milles
> Priority: Major
> Labels: breaking
>
> if java.time is the recommended way to proceed forward when dealing with
> dates,
> java.time.* should be included automatically similar to how java.util.Date is
> currently available without import.
> The preferred approach would be to make it a global import which would be in
> line with existing Groovy handling of java.util.Date
>
> The least invasive approach would be to make the import only apply if
> groovy-datetime module has been added.
>
> implementation "org.apache.groovy:groovy-datetime"
>
> should automatically import java.time.* to all classes
>
> This provides an easier migration path from Date -> DateTIme
> [https://groovy.apache.org/blog/groovy-dates-and-times-cheat]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)