blackdrag 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_r383715873
##########
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:
I wonder if we should even support JDK13 here. It is not a LTS version, it
will stop receiving updates after March 2020 and the stripIdent method in JDK13
is deprecated. I would prefer not changing the tests for that
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services