groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Moy <>
Date Wed, 04 Jul 2018 03:00:18 GMT

I reported bug metioned in the subject as I was not able to ascertain from
the web if what I am facing is a consequence of desired intent.

Paul King
 suggested  to check issue with the mailing list. Here I am following the

Using groovy shell to execute the following groovy script snippet fails at
compilation phase when executing the script through java. I am using Jre1.7

public static void main(String[] args) throws Exception,
IllegalAccessException { Object evaluate = new
GroovyShell().evaluate("\"abcd\".length() == .34");
System.out.println("result: " + evaluate);

 In the above snippet, If I replace *.34* with *0.34* then the script
execution works as expected.

Exception reported is as follows

Exception in thread "main"
startup failed:
Script1.groovy: 1: unexpected token: . @ line 1, column
20."abcd".length() == .34

1 error

at org.codehaus.groovy.control.ErrorCollector.failIfErrors(
at org.codehaus.groovy.control.ErrorCollector.addFatalError(
at org.codehaus.groovy.control.ErrorCollector.addError(
at org.codehaus.groovy.control.ErrorCollector.addError(
at org.codehaus.groovy.control.SourceUnit.addError(
at org.codehaus.groovy.antlr.AntlrParserPlugin.transformCSTIntoAST(
at org.codehaus.groovy.antlr.AntlrParserPlugin.parseCST(
at org.codehaus.groovy.control.SourceUnit.parse(
at org.codehaus.groovy.control.CompilationUnit$
at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(
at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(
at org.codehaus.groovy.control.CompilationUnit.compile(
at groovy.lang.GroovyClassLoader.doParseClass(
at groovy.lang.GroovyClassLoader.access$300(
at groovy.lang.GroovyClassLoader$5.provide(
at groovy.lang.GroovyClassLoader$5.provide(
at org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache.getAndPut(
at groovy.lang.GroovyClassLoader.parseClass(
at groovy.lang.GroovyShell.parseClass(
at groovy.lang.GroovyShell.parse(
at groovy.lang.GroovyShell.evaluate(
at groovy.lang.GroovyShell.evaluate(
at groovy.lang.GroovyShell.evaluate(
at groovytest.Testtest.main(

Please let me know if this problem will be fixed, if so which release and
when is the release date.

Dyutimoy  Sarkar

View raw message