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 2020/02/25 11:10:34 UTC

[GitHub] [groovy] paulk-asert commented on a change in pull request #1173: GROOVY-9211: BUG! UNCAUGHT EXCEPTION on OpenJDK14-ea+8

paulk-asert commented on a change in pull request #1173: GROOVY-9211: BUG! UNCAUGHT EXCEPTION on OpenJDK14-ea+8
URL: https://github.com/apache/groovy/pull/1173#discussion_r383813029
 
 

 ##########
 File path: src/test/groovy/lang/ScriptSourcePositionInAstTest.groovy
 ##########
 @@ -45,18 +46,24 @@ class ScriptSourcePositionInAstTest extends GroovyTestCase {
     }
 
     void testDoubleStatementScript() {
-        assert positionsForScript("""\
+        def raw = """\
             println 'hello'
             println 'bye'
-        """.stripIndent()) == [[1, 1], [2, 14]]
+        """
+        // avoid stripIndent issues on JDK13+ by calling Groovy's DGM stripIndent explicitly
+        def script = StringGroovyMethods.stripIndent((CharSequence)raw)
 
 Review comment:
   The @Deprecated on `stripIndent` in JDK13 is "just" how they mark preview features. The deprecation appears gone in 14 as the feature has now been more or less accepted. They still have a bit of a disclaimer in the javadoc text itself but I'd assume it is here bar a few tweaks for the foreseeable future. Unless someone else knows different.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services