You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by GitBox <gi...@apache.org> on 2022/10/25 01:46:03 UTC

[GitHub] [groovy] paulk-asert commented on a diff in pull request #1813: Cleanup build-logic

paulk-asert commented on code in PR #1813:
URL: https://github.com/apache/groovy/pull/1813#discussion_r1003918031


##########
build-logic/src/main/groovy/org/apache/groovy/gradle/JarJarTask.groovy:
##########
@@ -112,7 +114,7 @@ class JarJarTask extends DefaultTask {
         def manifestFile = new File(temporaryDir, 'MANIFEST.MF')
         // First step is to create a repackaged jar
         outputFile.parentFile.mkdirs()
-        def tstamp = Date.parse('yyyy-MM-dd HH:mm', '1980-02-01 00:00').time.toString()
+        def tstamp = (new SimpleDateFormat('yyyy-MM-dd HH:mm')).parse('1980-02-01 00:00').time.toString()

Review Comment:
   The original is more idiomatic Groovy



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@groovy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org