You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Scott (Jira)" <ji...@apache.org> on 2024/11/02 17:02:00 UTC

[jira] [Created] (GROOVY-11513) java.time.* should be imported automatically when groovy-datetime module is used

Scott created GROOVY-11513:
------------------------------

             Summary: java.time.* should be imported automatically when groovy-datetime module is used
                 Key: GROOVY-11513
                 URL: https://issues.apache.org/jira/browse/GROOVY-11513
             Project: Groovy
          Issue Type: Bug
          Components: Compiler
    Affects Versions: 4.0.23
            Reporter: Scott
             Fix For: 4.x


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 simplest 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



--
This message was sent by Atlassian Jira
(v8.20.10#820010)