[jira] [Created] (GROOVY-8162) Update Groovysh to JLine3
Pascal Schumacher created GROOVY-8162: - Summary: Update Groovysh to JLine3 Key: GROOVY-8162 URL: https://issues.apache.org/jira/browse/GROOVY-8162 Project: Groovy Issue Type: Improvement Components: Groovysh Reporter: Pascal Schumacher Groovysh currently uses https://github.com/jline/jline2 which is no longer supported. It should be updated to use https://github.com/jline/jline3 -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Closed] (GROOVY-7999) Disallow automatic String conversion in static compilation context
[ https://issues.apache.org/jira/browse/GROOVY-7999?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher closed GROOVY-7999. - Resolution: Duplicate > Disallow automatic String conversion in static compilation context > -- > > Key: GROOVY-7999 > URL: https://issues.apache.org/jira/browse/GROOVY-7999 > Project: Groovy > Issue Type: Bug >Affects Versions: 2.4.7 >Reporter: Graeme Rocher > > This code: > {code} > @groovy.transform.CompileStatic > class Bar { > protected List bar = [] > > boolean doStuff() { > String bar = this.bar > return bar.isEmpty() > } > } > new Bar().doStuff() > {code} > Prints false. IMO it should not be possible to assign a List to a String and > in a static compilation context this should be a compilation error. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (GROOVY-6107) Unable to access an outer class static method from a super call in the inner-class constructor
[ https://issues.apache.org/jira/browse/GROOVY-6107?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated GROOVY-6107: -- Issue Type: Bug (was: Sub-task) Parent: (was: GROOVY-5989) > Unable to access an outer class static method from a super call in the > inner-class constructor > -- > > Key: GROOVY-6107 > URL: https://issues.apache.org/jira/browse/GROOVY-6107 > Project: Groovy > Issue Type: Bug > Components: groovy-runtime >Affects Versions: 2.1.3, 2.4.0-beta-3 > Environment: OpenSUSE 12.2 > OpenJDK 1.7u17 > Groovy 2.1.3 >Reporter: Dmitry Ovchinnikov > Labels: call, class, constructor, inner, outer, super > Fix For: 2.4.8 > > Attachments: super_call_bug.groovy > > > The following code > {code} > import groovy.transform.* > //@CompileStatic > class X { > > final Y y = new Y(); > > public static List l() { > return Arrays.asList("a", "b"); > } > > class Y extends ArrayList { > Y() { > super(l()); > } > } > } > new X() > {code} > works fine with @CompileStatic but doesn't work without it. > Full stack trace: > {noformat} > Apr 17, 2013 2:48:57 PM org.codehaus.groovy.runtime.StackTraceUtils sanitize > WARNING: Sanitizing stacktrace: > groovy.lang.MissingMethodException: No signature of method: static X$Y.l() is > applicable for argument types: () values: [] > Possible solutions: is(java.lang.Object), any(), min(), last(), pop(), tail() > at > groovy.lang.MetaClassImpl.invokeStaticMissingMethod(MetaClassImpl.java:1373) > at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1359) > at > org.codehaus.groovy.runtime.callsite.StaticMetaClassSite.callStatic(StaticMetaClassSite.java:62) > at > org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArray.java:53) > at > org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:157) > at > org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:161) > at X$Y.(super_call_bug.groovy:14) > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) > at > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) > at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > at > org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77) > at > org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102) > at > org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:57) > at > org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182) > at > org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:190) > at X.(super_call_bug.groovy:6) > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) > at > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) > at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > at > org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77) > at > org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102) > at > org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:57) > at > org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182) > at > org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:186) > at super_call_bug.run(super_call_bug.groovy:19) > at > groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:257) > at groovy.lang.GroovyShell.run(GroovyShell.java:481) > at groovy.lang.GroovyShell.run(GroovyShell.java:163) > at groovy.lang.GroovyShell$run.call(Unknown Source) > at groovy.ui.Console$_runScriptImpl_closure17.doCall(Console.groovy:951) > at groovy.ui.Console$_runScriptImpl_closure17.doCall(Console.groovy) > at sun.reflect.GeneratedMethodAccessor207.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.
[jira] [Updated] (GROOVY-5985) Invalid hash key "serialVersionUID"
[ https://issues.apache.org/jira/browse/GROOVY-5985?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated GROOVY-5985: -- Issue Type: Bug (was: Sub-task) Parent: (was: GROOVY-2503) > Invalid hash key "serialVersionUID" > --- > > Key: GROOVY-5985 > URL: https://issues.apache.org/jira/browse/GROOVY-5985 > Project: Groovy > Issue Type: Bug > Components: groovy-runtime >Affects Versions: 2.1.0 > Environment: Groovy Version: 2.1.0 JVM: 1.7.0_11 Vendor: Oracle > Corporation OS: Mac OS X >Reporter: Dave Farnham >Assignee: John Wagenleitner > Fix For: 2.4.8 > > Attachments: bug.groovy > > > Using "serialVersionUID" as a hash key with bracket notation throws exception -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (GROOVY-7833) exception in phase 'conversion'
[ https://issues.apache.org/jira/browse/GROOVY-7833?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated GROOVY-7833: -- Component/s: Grape > exception in phase 'conversion' > --- > > Key: GROOVY-7833 > URL: https://issues.apache.org/jira/browse/GROOVY-7833 > Project: Groovy > Issue Type: Bug > Components: Grape >Affects Versions: 2.4.6 > Environment: Mac OS X 10.11.4 (15E65) >Reporter: Magnus Reftel >Assignee: Paul King > Fix For: 2.4.7 > > > The following script makes Grovy 2.4.6 exit with the message "Caught: BUG! > exception in phase 'conversion' in source unit > /path-to-code/conversion.groovy' # Licensed to the Apache Software Foundation > (ASF) under one or more": > @GrabResolver(name='jenkins', root='http://repo.jenkins-ci.org/releases') > @Grapes([ > @Grab(group='com.google.inject', module='guice', version='4.0-beta'), > @Grab(group='org.springframework', module='spring-beans', > version='3.0.5.RELEASE'), > @Grab(group='org.jenkins-ci.main', module='jenkins-core', version='2.1') > ]) > > import java.lang.String > The stack trace prints when run with --debug is: > BUG! exception in phase 'conversion' in source unit > '/path-to-code/conversion.groovy' # Licensed to the Apache Software > Foundation (ASF) under one or more > at > org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:935) > at > org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:593) > at > org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:569) > at > org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:546) > at > groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298) > at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268) > at groovy.lang.GroovyShell.parseClass(GroovyShell.java:688) > at groovy.lang.GroovyShell.run(GroovyShell.java:517) > at groovy.lang.GroovyShell.run(GroovyShell.java:507) > at groovy.ui.GroovyMain.processOnce(GroovyMain.java:652) > at groovy.ui.GroovyMain.run(GroovyMain.java:384) > at groovy.ui.GroovyMain.process(GroovyMain.java:370) > at groovy.ui.GroovyMain.processArgs(GroovyMain.java:129) > at groovy.ui.GroovyMain.main(GroovyMain.java:109) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:497) > at > org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:109) > at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:131) > Caused by: java.lang.ClassNotFoundException: # Licensed to the Apache > Software Foundation (ASF) under one or more > at java.net.URLClassLoader.findClass(URLClassLoader.java:381) > at java.lang.ClassLoader.loadClass(ClassLoader.java:424) > at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:677) > at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:787) > at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:775) > at groovy.lang.GroovyClassLoader$loadClass$0.call(Unknown Source) > at > org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) > at > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) > at > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125) > at > groovy.grape.GrapeIvy$_processRunners_closure4.doCall(GrapeIvy.groovy:341) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:497) > at > org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) > at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) > at > org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294) > at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1021) > at groovy.lang.Closure.call(Closure.java:426) > at groovy.lang.Closure.call(Closure.java:442) > at > org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2030) > at > org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2015)
[jira] [Updated] (GROOVY-7822) Redundant computation in ObservableSet
[ https://issues.apache.org/jira/browse/GROOVY-7822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated GROOVY-7822: -- Summary: Redundant computation in ObservableSet (was: CLONE - Redundant computation in ObservableSet) > Redundant computation in ObservableSet > -- > > Key: GROOVY-7822 > URL: https://issues.apache.org/jira/browse/GROOVY-7822 > Project: Groovy > Issue Type: Bug > Components: groovy-runtime >Affects Versions: 2.4.6 >Reporter: John Wagenleitner >Assignee: John Wagenleitner > Fix For: 2.4.7 > > > There appears to be redundant computaions in "ObservableList.retainAll" > methods in version 2.4.6. I have attached a test and proposed a small > patch which ensures that "contains" method is called on hashset of > input collection. This patch gives 1739X speed up on my > machine for the provided test. > Also, one more possibility to fix the issue is by using TreeSet as suggested > in > https://issues.apache.org/jira/browse/GROOVY-5739 as well. > Similar patches can be applied for three other methods, > ObservableList.removeAll, ObservableSet.retainAll, ObservableSet.removeAll. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (GROOVY-7791) Update JLine to 2.14.2
[ https://issues.apache.org/jira/browse/GROOVY-7791?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated GROOVY-7791: -- Summary: Update JLine to 2.14.2 (was: Update JLine to 2.14.1) > Update JLine to 2.14.2 > -- > > Key: GROOVY-7791 > URL: https://issues.apache.org/jira/browse/GROOVY-7791 > Project: Groovy > Issue Type: Task > Components: Groovysh >Reporter: Pascal Schumacher >Assignee: Pascal Schumacher > Fix For: 2.5.0-beta-1 > > -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (GROOVY-7788) Groovy does not run on 64 bit Windows 7
[ https://issues.apache.org/jira/browse/GROOVY-7788?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15295535#comment-15295535 ] Pascal Schumacher commented on GROOVY-7788: --- [~keegan] Maybe you can take a look at this? > Groovy does not run on 64 bit Windows 7 > --- > > Key: GROOVY-7788 > URL: https://issues.apache.org/jira/browse/GROOVY-7788 > Project: Groovy > Issue Type: Bug > Components: windows installer >Affects Versions: 2.4.6 > Environment: Microsoft Windows 7 Enterprise 64 bit > java version 1.8.0_65 > Java(TM) SE Runtime Environment (build 1.8.0_65-b17) > Java HotSpot(TM) 64-Bit server VM (build 25.65-b01, mixed mode) >Reporter: Shawn Cole >Priority: Minor > Labels: windows > > When I try to execute groovy I get: > error: dynamic library C:\Program > Files\Java\jdk1.8.0_65\jre\bin\server\jvm.dll exists but could not be loaded! > This may be caused e.g. by trying to use a 32-bit executable to load a 64-bit > jvm (or vice versa) > error (win code 193): (null) > error: could not find client or server jvm under C:\Program > Files\Java\jdk1.8.0_65 > please check that it is a valid jdk / jre containing the desired type of jvm > I have a 64 bit machine and 64 bit java, with my JAVA_HOME pointing to > C:\Program Files\Java\jdk1.8.0_65 > The problem seems to be when I ran the windows installer, it installed a 32 > bit version of groovy on my machine that is not able to run on the 64 bit JVM. > Is there any workarounds to this? and please don't say install the 32 bit > version of java, because if that is the only solution i'd rather just not > learn this language. I can't seem to find any binaries specific to 64 bit or > 32. > Also note worthy: I can launch groovy shell and groovy console with their > corresponding batch files in the bin directory successfully. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (GROOVY-7824) Windows Installer sets Search Path Incorrectly
[ https://issues.apache.org/jira/browse/GROOVY-7824?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15295534#comment-15295534 ] Pascal Schumacher commented on GROOVY-7824: --- [~keegan] Maybe you can take a look at this? > Windows Installer sets Search Path Incorrectly > -- > > Key: GROOVY-7824 > URL: https://issues.apache.org/jira/browse/GROOVY-7824 > Project: Groovy > Issue Type: Bug > Components: windows installer >Affects Versions: 2.4.6 > Environment: Windows 10 Pro x64 >Reporter: Dennis E. Hamilton > > When addition to the User environment is selected during the Windows install > (rather than the pre-checked System case), the GROOVY_HOME variable is set. > However, the PATH addition is %GROOVY_HOME%\bin and that does not work with > either cmd.exe or PowerShell. Batch variables are not recognized and > processed in the PATH list. > The following abbreviated cmd.exe capture demonstrates what happens: > D:\OneDrive\VSProjects>groovy -v > 'groovy' is not recognized as an internal or external command, > operable program or batch file. > D:\OneDrive\VSProjects>set > [ ... abbreviated ... ] > GROOVY_HOME=C:\PROGRA~2\Groovy\GROOVY~1.6 > HOMEDRIVE=C: > HOMEPATH=\Users\orcmi_000 > LOCALAPPDATA=C:\Users\orcmi_000\AppData\Local > LOGONSERVER=\\MicrosoftAccount > MYNODE=C:\Program Files\nodejs\ > NUMBER_OF_PROCESSORS=8 > OS=Windows_NT > Path=C:\Users\orcmi_000\AppData\Roaming\npm; > [ ... much abbreviation ... ] > D:\crea\Microsoft VS Code\bin;%GROOVY_HOME%\bin > [ THE USE OF %GROOVY_HOME% here is not going to work ] > > PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.groovy;.gy > PROCESSOR_ARCHITECTURE=AMD64 > PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 58 Stepping 9, GenuineIntel > PROCESSOR_LEVEL=6 > PROCESSOR_REVISION=3a09 > ProgramData=C:\ProgramData > ProgramFiles=C:\Program Files > ProgramFiles(x86)=C:\Program Files (x86) > ProgramW6432=C:\Program Files > [ ... abbreviated ...] > D:\OneDrive\VSProjects>%GROOVY_HOME%\bin\groovy -v > Groovy Version: 2.4.6 JVM: 1.7.0_55 Vendor: Oracle Corporation OS: Windows 8 > D:\OneDrive\VSProjects> > *** Neither CMD.EXE nor PowerShell will process batch variables in the > *** PATH list. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (GROOVY-7835) Groovysh does not support static import aliasing
[ https://issues.apache.org/jira/browse/GROOVY-7835?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated GROOVY-7835: -- Description: Groovysh does not as yet seem to support static import aliasing, e.g.: ``` groovy:000> import static Calendar.getInstance as now ===> static Calendar.getInstance as now groovy:000> now.class Unknown property: now groovy:000> ``` See http://docs.groovy-lang.org/latest/html/documentation/index.html#_static_import_aliasing was: Groovysh does not as yet seem to support import aliasing, e.g.: ``` groovy:000> import static Calendar.getInstance as now ===> static Calendar.getInstance as now groovy:000> now.class Unknown property: now groovy:000> ``` See http://docs.groovy-lang.org/latest/html/documentation/index.html#_static_import_aliasing Summary: Groovysh does not support static import aliasing (was: Groovysh does not support import aliasing) update the title and description according to Jakes comment > Groovysh does not support static import aliasing > > > Key: GROOVY-7835 > URL: https://issues.apache.org/jira/browse/GROOVY-7835 > Project: Groovy > Issue Type: Improvement > Components: Groovysh >Affects Versions: 2.4.6 >Reporter: Jake Gage >Priority: Minor > > Groovysh does not as yet seem to support static import aliasing, e.g.: > ``` > groovy:000> import static Calendar.getInstance as now > ===> static Calendar.getInstance as now > groovy:000> now.class > Unknown property: now > groovy:000> > ``` > See > http://docs.groovy-lang.org/latest/html/documentation/index.html#_static_import_aliasing -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (GROOVY-7835) Groovysh does not support static import aliasing
[ https://issues.apache.org/jira/browse/GROOVY-7835?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated GROOVY-7835: -- Description: Groovysh does not as yet seem to support static import aliasing, e.g.: {quote} groovy:000> import static Calendar.getInstance as now ===> static Calendar.getInstance as now groovy:000> now.class Unknown property: now groovy:000> {quote} See http://docs.groovy-lang.org/latest/html/documentation/index.html#_static_import_aliasing was: Groovysh does not as yet seem to support static import aliasing, e.g.: ``` groovy:000> import static Calendar.getInstance as now ===> static Calendar.getInstance as now groovy:000> now.class Unknown property: now groovy:000> ``` See http://docs.groovy-lang.org/latest/html/documentation/index.html#_static_import_aliasing > Groovysh does not support static import aliasing > > > Key: GROOVY-7835 > URL: https://issues.apache.org/jira/browse/GROOVY-7835 > Project: Groovy > Issue Type: Improvement > Components: Groovysh >Affects Versions: 2.4.6 >Reporter: Jake Gage >Priority: Minor > > Groovysh does not as yet seem to support static import aliasing, e.g.: > {quote} > groovy:000> import static Calendar.getInstance as now > ===> static Calendar.getInstance as now > groovy:000> now.class > Unknown property: now > groovy:000> > {quote} > See > http://docs.groovy-lang.org/latest/html/documentation/index.html#_static_import_aliasing -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Resolved] (GROOVY-6203) GroovyScriptEngine does not take script base class into account
[ https://issues.apache.org/jira/browse/GROOVY-6203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher resolved GROOVY-6203. --- Resolution: Fixed Assignee: Pascal Schumacher Fix Version/s: 2.4.7 Pull request merged. Thanks! > GroovyScriptEngine does not take script base class into account > --- > > Key: GROOVY-6203 > URL: https://issues.apache.org/jira/browse/GROOVY-6203 > Project: Groovy > Issue Type: Bug > Components: GroovyScriptEngine >Affects Versions: 2.0.5 >Reporter: Julien Nicoulaud >Assignee: Pascal Schumacher > Fix For: 2.4.7 > > > When configuring GroovyScriptEngine with a custom script base class, the > script engine does not take it account: > {code} > CompilerConfiguration cc = new CompilerConfiguration(); > cc.setScriptBaseClass(ScriptBase.class.getName()); > GroovyScriptEngine engine = new GroovyScriptEngine("file://."); > engine.setConfig(cc); > Script script = engine.createScript("test.groovy", new Binding()); > assertTrue(script instanceof ScriptBase); // fails > {code} > This has been discussed here: > http://groovy.329449.n5.nabble.com/setScriptBaseClass-does-not-work-for-GroovyScriptEngine-td5710646.html > The workaround with setting the CompilerConfiguration on the > GroovyClassLoader works. > Also related: GROOVY-3281 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (GROOVY-6203) GroovyScriptEngine does not take script base class into account
[ https://issues.apache.org/jira/browse/GROOVY-6203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated GROOVY-6203: -- Labels: (was: contrib) > GroovyScriptEngine does not take script base class into account > --- > > Key: GROOVY-6203 > URL: https://issues.apache.org/jira/browse/GROOVY-6203 > Project: Groovy > Issue Type: Bug > Components: GroovyScriptEngine >Affects Versions: 2.0.5 >Reporter: Julien Nicoulaud > Fix For: 2.4.7 > > > When configuring GroovyScriptEngine with a custom script base class, the > script engine does not take it account: > {code} > CompilerConfiguration cc = new CompilerConfiguration(); > cc.setScriptBaseClass(ScriptBase.class.getName()); > GroovyScriptEngine engine = new GroovyScriptEngine("file://."); > engine.setConfig(cc); > Script script = engine.createScript("test.groovy", new Binding()); > assertTrue(script instanceof ScriptBase); // fails > {code} > This has been discussed here: > http://groovy.329449.n5.nabble.com/setScriptBaseClass-does-not-work-for-GroovyScriptEngine-td5710646.html > The workaround with setting the CompilerConfiguration on the > GroovyClassLoader works. > Also related: GROOVY-3281 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Resolved] (GROOVY-7832) NullPointerException in GroovyConsole with an input method
[ https://issues.apache.org/jira/browse/GROOVY-7832?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher resolved GROOVY-7832. --- Resolution: Fixed Assignee: Jochen Theodorou Fix Version/s: 2.4.7 merged Jochens pull request > NullPointerException in GroovyConsole with an input method > -- > > Key: GROOVY-7832 > URL: https://issues.apache.org/jira/browse/GROOVY-7832 > Project: Groovy > Issue Type: Bug > Components: Groovy Console >Affects Versions: 2.4.6 > Environment: OS X El Capitan (version 10.11.4), JDK 7u71, Google > Japanese Input 2.17.2400.1 >Reporter: Muneyuki Noguchi >Assignee: Jochen Theodorou > Fix For: 2.4.7 > > Attachments: NullPointerException_in_groovyConsole.png > > > When an input method is enabled and focus is set to a Groovy Console window, > the Groovy Console sometimes throws NullPointerException. > Here is a message from the Groovy Console: > {code} > Exception in thread "AWT-EventQueue-0" > java.lang.NullPointerException > at > groovy.ui.text.StructuredSyntaxDocumentFilter.replaceMetaCharacters(StructuredSyntaxDocumentFilter.java:285) > at > groovy.ui.text.StructuredSyntaxDocumentFilter.replace(StructuredSyntaxDocumentFilter.java:274) > at javax.swing.text.AbstractDocument.replace(AbstractDocument.java:662) > at javax.swing.JTextPane.replaceSelection(JTextPane.java:192) > at javax.swing.JTextPane.replaceSelection(JTextPane.java:175) > at groovy.ui.text.TextEditor.replaceSelection(TextEditor.java:367) > at > javax.swing.text.JTextComponent.replaceInputMethodText(JTextComponent.java:4767) > at > javax.swing.text.JTextComponent.processInputMethodEvent(JTextComponent.java:4506) > at java.awt.Component.processEvent(Component.java:6298) > at java.awt.Container.processEvent(Container.java:2229) > at java.awt.Component.dispatchEventImpl(Component.java:4872) > at java.awt.Container.dispatchEventImpl(Container.java:2287) > at java.awt.Component.dispatchEvent(Component.java:4698) > at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735) > at java.awt.EventQueue.access$200(EventQueue.java:103) > at java.awt.EventQueue$3.run(EventQueue.java:694) > at java.awt.EventQueue$3.run(EventQueue.java:692) > at java.security.AccessController.doPrivileged(Native Method) > at > java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) > at > java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87) > at java.awt.EventQueue$4.run(EventQueue.java:708) > at java.awt.EventQueue$4.run(EventQueue.java:706) > at java.security.AccessController.doPrivileged(Native Method) > at > java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) > at java.awt.EventQueue.dispatchEvent(EventQueue.java:705) > at > java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242) > at > java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161) > at > java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150) > at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146) > at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138) > at java.awt.EventDispatchThread.run(EventDispatchThread.java:91) > java.lang.reflect.InvocationTargetException > at sun.lwawt.macosx.LWCToolkit.invokeAndWait(LWCToolkit.java:572) > at > sun.lwawt.macosx.CInputMethod.attributedSubstringFromRange(CInputMethod.java:586) > Caused by: java.lang.IllegalArgumentException: Invalid substring range > at > java.text.AttributedString$AttributedStringIterator.(AttributedString.java:756) > at java.text.AttributedString.getIterator(AttributedString.java:583) > at sun.lwawt.macosx.CInputMethod$3.run(CInputMethod.java:605) > at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:302) > at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733) > at java.awt.EventQueue.access$200(EventQueue.java:103) > at java.awt.EventQueue$3.run(EventQueue.java:694) > at java.awt.EventQueue$3.run(EventQueue.java:692) > at java.security.AccessController.doPrivileged(Native Method) > at > java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) > at > java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87) > at java.awt.EventQueue$4.run(EventQueue.java:708) > at java.awt.EventQueue$4.run(EventQueue.java:706) > at java.security.AccessController.doPrivileged(Native Method) > at > java.securit
[jira] [Resolved] (GROOVY-7826) Infinite recursion in genericTypeAsString
[ https://issues.apache.org/jira/browse/GROOVY-7826?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher resolved GROOVY-7826. --- Resolution: Fixed Assignee: Pascal Schumacher Fix Version/s: 2.4.7 Pull request merged. Thanks! > Infinite recursion in genericTypeAsString > - > > Key: GROOVY-7826 > URL: https://issues.apache.org/jira/browse/GROOVY-7826 > Project: Groovy > Issue Type: Bug >Affects Versions: 2.4.6 > Environment: Groovy Version: 2.4.6 JVM: 1.8.0_91 Vendor: Oracle > Corporation OS: Linux >Reporter: Magnus Reftel >Assignee: Pascal Schumacher > Labels: regresion > Fix For: 2.4.7 > > Attachments: groovy-7826.zip > > > The following two Java classes C1 and C2 cause Groovy to enter infinite > recursion in genericTypeAsString when a method that takes a C1 is declared: > C1.java: > public class C1 ,T1 extends C1> { } > class C2, T1 extends C1> { } > repro.groovy > def f(C1 c1) { } > This is reduced from actual code in Jenkins, where Run and Job have type > parameters like this. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Comment Edited] (GROOVY-7821) @CompileStatic and exception list throws ClassCastException
[ https://issues.apache.org/jira/browse/GROOVY-7821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15282779#comment-15282779 ] Pascal Schumacher edited comment on GROOVY-7821 at 5/13/16 3:12 PM: Yes, current master will be the 2.5.0 release. was (Author: pascalschumacher): Yes, current master will be 2.5.0 release. > @CompileStatic and exception list throws ClassCastException > --- > > Key: GROOVY-7821 > URL: https://issues.apache.org/jira/browse/GROOVY-7821 > Project: Groovy > Issue Type: Bug >Affects Versions: 2.4.6 > Environment: OSX, java version "1.8.0_40" >Reporter: Brendon Anderson >Priority: Minor > > {code:title=Bar.java|borderStyle=solid} > @Slf4j > @CompileStatic > class TestException { > static void main(String[] args) { > try { > throw new NullPointerException('ahh!') > } catch (NullPointerException | IOException e) { > log.error('error {}', e.message) > } > } > } > {code} > This throws a ClassCastException: > {noformat} > Exception in thread "main" java.lang.ClassCastException: > java.lang.NullPointerException cannot be cast to java.io.IOException > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (GROOVY-7821) @CompileStatic and exception list throws ClassCastException
[ https://issues.apache.org/jira/browse/GROOVY-7821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15282779#comment-15282779 ] Pascal Schumacher commented on GROOVY-7821: --- Yes, current master will be 2.5.0 release. > @CompileStatic and exception list throws ClassCastException > --- > > Key: GROOVY-7821 > URL: https://issues.apache.org/jira/browse/GROOVY-7821 > Project: Groovy > Issue Type: Bug >Affects Versions: 2.4.6 > Environment: OSX, java version "1.8.0_40" >Reporter: Brendon Anderson >Priority: Minor > > {code:title=Bar.java|borderStyle=solid} > @Slf4j > @CompileStatic > class TestException { > static void main(String[] args) { > try { > throw new NullPointerException('ahh!') > } catch (NullPointerException | IOException e) { > log.error('error {}', e.message) > } > } > } > {code} > This throws a ClassCastException: > {noformat} > Exception in thread "main" java.lang.ClassCastException: > java.lang.NullPointerException cannot be cast to java.io.IOException > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Resolved] (GROOVY-6514) groovysh should offer easier access to grapes
[ https://issues.apache.org/jira/browse/GROOVY-6514?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher resolved GROOVY-6514. --- Resolution: Fixed Assignee: Pascal Schumacher Fix Version/s: 2.5.0-beta-1 Pull request merged. Thanks everybody! > groovysh should offer easier access to grapes > - > > Key: GROOVY-6514 > URL: https://issues.apache.org/jira/browse/GROOVY-6514 > Project: Groovy > Issue Type: Improvement > Components: Groovysh >Reporter: Thibault Kruse >Assignee: Pascal Schumacher >Priority: Minor > Fix For: 2.5.0-beta-1 > > > groovysh can be started using a -cp option to use a given classpath. (BTW, > the option is missing from the docs at http://groovy.codehaus.org/Groovy+Shell > However it is rather cumbersome to use this mechanism to start groovysh to > e.g. use a more convenient xml parser or such. > So I can think of some solutions: > * add an option to use the latest of all libraries in ~/.groovy/grapes > * add an option to use specific grapes on startup, which would download > those if necessary and then put them on the classpath > * provide a virtual environment tool that sets the classpath according to a > definition file defining the grapes to be used. > Thoughts? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (GROOVY-6514) groovysh should offer easier access to grapes
[ https://issues.apache.org/jira/browse/GROOVY-6514?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated GROOVY-6514: -- Priority: Major (was: Minor) > groovysh should offer easier access to grapes > - > > Key: GROOVY-6514 > URL: https://issues.apache.org/jira/browse/GROOVY-6514 > Project: Groovy > Issue Type: Improvement > Components: Groovysh >Reporter: Thibault Kruse >Assignee: Pascal Schumacher > Fix For: 2.5.0-beta-1 > > > groovysh can be started using a -cp option to use a given classpath. (BTW, > the option is missing from the docs at http://groovy.codehaus.org/Groovy+Shell > However it is rather cumbersome to use this mechanism to start groovysh to > e.g. use a more convenient xml parser or such. > So I can think of some solutions: > * add an option to use the latest of all libraries in ~/.groovy/grapes > * add an option to use specific grapes on startup, which would download > those if necessary and then put them on the classpath > * provide a virtual environment tool that sets the classpath according to a > definition file defining the grapes to be used. > Thoughts? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Resolved] (GROOVY-7793) Compiler compiles class with private abstract method
[ https://issues.apache.org/jira/browse/GROOVY-7793?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher resolved GROOVY-7793. --- Resolution: Fixed Assignee: Pascal Schumacher Fix Version/s: 2.4.7 Pull request merged. Thanks! > Compiler compiles class with private abstract method > > > Key: GROOVY-7793 > URL: https://issues.apache.org/jira/browse/GROOVY-7793 > Project: Groovy > Issue Type: Bug > Components: bytecode, Compiler >Affects Versions: 2.3.11 > Environment: - OS X > - Java(TM) SE Runtime Environment (build 1.8.0_66-b17) > - IntelliJ Idea 14 CE \w Groovy plugin > - Gradle 2.2 >Reporter: Simo Tuokko >Assignee: Pascal Schumacher > Fix For: 2.4.7 > > > Using Groovy and JDBI in following class: > {code:title=ItemDAO.groovy|borderStyle=solid} > abstract class ItemDAO { > @SqlUpdate("...") > @GetGeneratedKeys > private abstract long insertItem(@BindBean Item item) > } > {code} > When class is used JDBI will create proxy-implementation based on the the > abstract class (or interface). > It will compile without any issues, but running it causes (shown below) > class-loading/verify error. This is programmers fault to have "private > abstract" methods, but I guess Groovy-compiler should not let this thru? > Maybe IntelliJ Idea groovy-plugin should say it's illegal as well? > I haven't tried this with the latest Groovy-version but unless it has been > specifically fixed it might still occur? > --- > Exception in thread "main" java.lang.ClassFormatError: Method insertDish in > class com/company/ItemDAO has illegal modifiers: 0x402 > at java.lang.ClassLoader.defineClass1(Native Method) > at java.lang.ClassLoader.defineClass(ClassLoader.java:760) > at > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) > at java.net.URLClassLoader.defineClass(URLClassLoader.java:467) > at java.net.URLClassLoader.access$100(URLClassLoader.java:73) > at java.net.URLClassLoader$1.run(URLClassLoader.java:368) > at java.net.URLClassLoader$1.run(URLClassLoader.java:362) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:361) > at java.lang.ClassLoader.loadClass(ClassLoader.java:424) > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) > at java.lang.ClassLoader.loadClass(ClassLoader.java:357) > at java.lang.Class.getDeclaredMethods0(Native Method) > at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) > at java.lang.Class.getDeclaredMethods(Class.java:1975) > at > org.codehaus.groovy.reflection.CachedClass$3$1.run(CachedClass.java:85) > at java.security.AccessController.doPrivileged(Native Method) > at > org.codehaus.groovy.reflection.CachedClass$3.initValue(CachedClass.java:82) > at > org.codehaus.groovy.reflection.CachedClass$3.initValue(CachedClass.java:80) > at > org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46) > at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33) > at > org.codehaus.groovy.reflection.CachedClass.getMethods(CachedClass.java:251) > at groovy.lang.MetaClassImpl.populateMethods(MetaClassImpl.java:390) > at groovy.lang.MetaClassImpl.fillMethodIndex(MetaClassImpl.java:340) > at groovy.lang.MetaClassImpl.initialize(MetaClassImpl.java:3224) > at > org.codehaus.groovy.reflection.ClassInfo.getMetaClassUnderLock(ClassInfo.java:222) > at > org.codehaus.groovy.reflection.ClassInfo.getMetaClass(ClassInfo.java:253) > at > org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.getMetaClass(MetaClassRegistryImpl.java:255) > at > org.codehaus.groovy.runtime.InvokerHelper.getMetaClass(InvokerHelper.java:859) > at > org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallConstructorSite(CallSiteArray.java:84) > at > org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:57) > at > org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182) > at > org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:194) -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Resolved] (GROOVY-7604) traits docs diamond problem explanation
[ https://issues.apache.org/jira/browse/GROOVY-7604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher resolved GROOVY-7604. --- Resolution: Fixed Assignee: Pascal Schumacher Fix Version/s: 2.4.7 Pull request merged. Thanks! > traits docs diamond problem explanation > --- > > Key: GROOVY-7604 > URL: https://issues.apache.org/jira/browse/GROOVY-7604 > Project: Groovy > Issue Type: Documentation >Reporter: Aseem Bansal >Assignee: Pascal Schumacher > Fix For: 2.4.7 > > > http://www.groovy-lang.org/objectorientation.html#_composition_of_behaviors > has an example after referring diamond problem. Is it correct example for > diamond problem? Shouldn't the method names be the same? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (GROOVY-7795) Upgrade xstream to 1.4.9
Pascal Schumacher created GROOVY-7795: - Summary: Upgrade xstream to 1.4.9 Key: GROOVY-7795 URL: https://issues.apache.org/jira/browse/GROOVY-7795 Project: Groovy Issue Type: Task Reporter: Pascal Schumacher Assignee: Pascal Schumacher Fix For: 2.5.0-beta-1 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Resolved] (GROOVY-7795) Upgrade xstream to 1.4.9
[ https://issues.apache.org/jira/browse/GROOVY-7795?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher resolved GROOVY-7795. --- Resolution: Fixed > Upgrade xstream to 1.4.9 > > > Key: GROOVY-7795 > URL: https://issues.apache.org/jira/browse/GROOVY-7795 > Project: Groovy > Issue Type: Task >Reporter: Pascal Schumacher >Assignee: Pascal Schumacher > Fix For: 2.5.0-beta-1 > > -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Resolved] (GROOVY-7792) Update ASM to 5.1
[ https://issues.apache.org/jira/browse/GROOVY-7792?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher resolved GROOVY-7792. --- Resolution: Fixed > Update ASM to 5.1 > - > > Key: GROOVY-7792 > URL: https://issues.apache.org/jira/browse/GROOVY-7792 > Project: Groovy > Issue Type: Task >Reporter: Pascal Schumacher >Assignee: Pascal Schumacher > Fix For: 2.5.0-beta-1 > > -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (GROOVY-7792) Update ASM to 5.1
Pascal Schumacher created GROOVY-7792: - Summary: Update ASM to 5.1 Key: GROOVY-7792 URL: https://issues.apache.org/jira/browse/GROOVY-7792 Project: Groovy Issue Type: Task Reporter: Pascal Schumacher Assignee: Pascal Schumacher Fix For: 2.5.0-beta-1 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (GROOVY-7634) Update Logback version to 1.1.6
[ https://issues.apache.org/jira/browse/GROOVY-7634?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated GROOVY-7634: -- Summary: Update Logback version to 1.1.6 (was: Update Logback version to 1.1.3) > Update Logback version to 1.1.6 > --- > > Key: GROOVY-7634 > URL: https://issues.apache.org/jira/browse/GROOVY-7634 > Project: Groovy > Issue Type: Task >Reporter: Pascal Schumacher >Assignee: Pascal Schumacher >Priority: Minor > Fix For: 2.5.0-beta-1 > > -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (GROOVY-7653) Update SLF4J version to 1.7.19
[ https://issues.apache.org/jira/browse/GROOVY-7653?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated GROOVY-7653: -- Summary: Update SLF4J version to 1.7.19 (was: Update SLF4J version to 1.7.12) > Update SLF4J version to 1.7.19 > -- > > Key: GROOVY-7653 > URL: https://issues.apache.org/jira/browse/GROOVY-7653 > Project: Groovy > Issue Type: Task >Reporter: Pascal Schumacher >Assignee: Pascal Schumacher >Priority: Minor > Fix For: 2.5.0-beta-1 > > -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (GROOVY-7791) Update JLine to 2.14.1
[ https://issues.apache.org/jira/browse/GROOVY-7791?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated GROOVY-7791: -- Summary: Update JLine to 2.14.1 (was: Update JLine to 2.14) > Update JLine to 2.14.1 > -- > > Key: GROOVY-7791 > URL: https://issues.apache.org/jira/browse/GROOVY-7791 > Project: Groovy > Issue Type: Task > Components: Groovysh >Reporter: Pascal Schumacher >Assignee: Pascal Schumacher > Fix For: 2.5.0-beta-1 > > -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (GROOVY-7791) Update JLine to 2.14
Pascal Schumacher created GROOVY-7791: - Summary: Update JLine to 2.14 Key: GROOVY-7791 URL: https://issues.apache.org/jira/browse/GROOVY-7791 Project: Groovy Issue Type: Task Reporter: Pascal Schumacher -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Resolved] (GROOVY-7791) Update JLine to 2.14
[ https://issues.apache.org/jira/browse/GROOVY-7791?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher resolved GROOVY-7791. --- Resolution: Fixed Fix Version/s: 2.5.0-beta-1 > Update JLine to 2.14 > > > Key: GROOVY-7791 > URL: https://issues.apache.org/jira/browse/GROOVY-7791 > Project: Groovy > Issue Type: Task > Components: Groovysh >Reporter: Pascal Schumacher >Assignee: Pascal Schumacher > Fix For: 2.5.0-beta-1 > > -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (GROOVY-7791) Update JLine to 2.14
[ https://issues.apache.org/jira/browse/GROOVY-7791?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated GROOVY-7791: -- Assignee: Pascal Schumacher Component/s: Groovysh > Update JLine to 2.14 > > > Key: GROOVY-7791 > URL: https://issues.apache.org/jira/browse/GROOVY-7791 > Project: Groovy > Issue Type: Task > Components: Groovysh >Reporter: Pascal Schumacher >Assignee: Pascal Schumacher > Fix For: 2.5.0-beta-1 > > -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Assigned] (GROOVY-7566) Groovysh command arguments parser does not handle escaped blanks
[ https://issues.apache.org/jira/browse/GROOVY-7566?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher reassigned GROOVY-7566: - Assignee: Pascal Schumacher > Groovysh command arguments parser does not handle escaped blanks > > > Key: GROOVY-7566 > URL: https://issues.apache.org/jira/browse/GROOVY-7566 > Project: Groovy > Issue Type: Bug > Components: Groovysh >Affects Versions: 2.4.0, 2.4.4 >Reporter: Thibault Kruse >Assignee: Pascal Schumacher > Fix For: 2.5.0-beta-1 > > > To reproduce: > {code} > groovy:000> import org.codehaus.groovy.tools.shell.util.CommandArgumentParser > ===> org.codehaus.groovy.tools.shell.util.CommandArgumentParser > groovy:000> CommandArgumentParser.parseLine('foo \\"') > Missing closing " in foo \" -- [foo, \] > // should single argument escaped hyphen > groovy:000> CommandArgumentParser.parseLine('\' \\\' bar\'') > ===> [\ ' bar] > // should be single (quoted) argument [\\ \' bar] > {code} > See https://github.com/apache/incubator-groovy/pull/92 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Assigned] (GROOVY-7567) Groovysh File completion with hyphens broken
[ https://issues.apache.org/jira/browse/GROOVY-7567?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher reassigned GROOVY-7567: - Assignee: Pascal Schumacher > Groovysh File completion with hyphens broken > > > Key: GROOVY-7567 > URL: https://issues.apache.org/jira/browse/GROOVY-7567 > Project: Groovy > Issue Type: Bug > Components: Groovysh >Affects Versions: 2.4.0, 2.4.4 >Reporter: Thibault Kruse >Assignee: Pascal Schumacher > Fix For: 2.5.0-beta-1 > > > To reproduce ('|' is cursor, means hitting tab): > {code} > $ touch foo.groovy > $ touch 'foo bar' > groovy:000> :load "foo| > groovy:000> :load "'foo.groovy ' // invalid double hyphens and trailing blank > {code} > I suggest handling whitespaces in filenames via escaped blanks, not hyphens. > See https://github.com/apache/incubator-groovy/pull/92 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Assigned] (GROOVY-7562) imports and custom class defs not working in Groovysh Interpreter Mode
[ https://issues.apache.org/jira/browse/GROOVY-7562?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher reassigned GROOVY-7562: - Assignee: Pascal Schumacher > imports and custom class defs not working in Groovysh Interpreter Mode > -- > > Key: GROOVY-7562 > URL: https://issues.apache.org/jira/browse/GROOVY-7562 > Project: Groovy > Issue Type: Bug > Components: Groovysh >Affects Versions: 2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.4.4 >Reporter: Thibault Kruse >Assignee: Pascal Schumacher > Fix For: 2.5.0-beta-1 > > > To reproduce > {code} > groovy:000> :set interpreterMode true > groovy:000> class Me { String name } > ===> true > groovy:000> m = new Me() > script14405523893121089774169.groovy: 2: unable to resolve class Me > groovy:000> import java.rmi.Remote > ===> java.rmi.Remote > groovy:000> Remote x > script1440757530265448239810.groovy: 1: unable to resolve class Remote > @ line 1, column 8. >Remote x > {code} > See https://github.com/apache/incubator-groovy/pull/100 for fix -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Assigned] (GROOVY-7565) Groovysh tab completion should provide trailing spaces only when expecting more arguments
[ https://issues.apache.org/jira/browse/GROOVY-7565?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher reassigned GROOVY-7565: - Assignee: Pascal Schumacher > Groovysh tab completion should provide trailing spaces only when expecting > more arguments > - > > Key: GROOVY-7565 > URL: https://issues.apache.org/jira/browse/GROOVY-7565 > Project: Groovy > Issue Type: Improvement > Components: Groovysh >Affects Versions: 2.4.0, 2.4.4 >Reporter: Thibault Kruse >Assignee: Pascal Schumacher >Priority: Minor > Fix For: 2.5.0-beta-1 > > > And also bug after 'as' completion of import > To reproduce ( '|' shows the cursor, means hitting tab) > {code} > groovy:000> :ex| > groovy:000> :exit | // bad trailing blank, no more arguments allowed > groovy:000> :history sh| > groovy:000> :history show | // bad trailing blank, no more arguments allowed > groovy:000> import java.lang.Math as Foo| > // internal Exception, causes prompt to be reprinted > {code} > See https://github.com/apache/incubator-groovy/pull/92 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (GROOVY-7708) StreamingJsonBuilder doesn't define DelegatesTo on some methods, impacting @CompileStatic usage
[ https://issues.apache.org/jira/browse/GROOVY-7708?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated GROOVY-7708: -- Fix Version/s: (was: 2.5.0-beta-1) > StreamingJsonBuilder doesn't define DelegatesTo on some methods, impacting > @CompileStatic usage > --- > > Key: GROOVY-7708 > URL: https://issues.apache.org/jira/browse/GROOVY-7708 > Project: Groovy > Issue Type: Improvement >Affects Versions: 2.4.5 >Reporter: Graeme Rocher > Fix For: 2.4.6 > > -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (GROOVY-7706) StreamingJsonBuilder should supported nested closures
[ https://issues.apache.org/jira/browse/GROOVY-7706?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated GROOVY-7706: -- Fix Version/s: (was: 2.5.0-beta-1) > StreamingJsonBuilder should supported nested closures > -- > > Key: GROOVY-7706 > URL: https://issues.apache.org/jira/browse/GROOVY-7706 > Project: Groovy > Issue Type: Improvement >Affects Versions: 2.4.5 >Reporter: Graeme Rocher > Fix For: 2.4.6 > > > Currently `StreamingJsonBuilder` doesn't handle nested closures properly and > instead these are delegated to `JsonOutput.toJso`n which is not streaming and > leads to an unexpected change of delegate in the nested closure. This pull > request fixes that erroneous behaviour. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (GROOVY-7703) Add support for Iterable with Closure to JsonBuilder/StreamingJsonBuilder
[ https://issues.apache.org/jira/browse/GROOVY-7703?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated GROOVY-7703: -- Fix Version/s: (was: 2.5.0-beta-1) > Add support for Iterable with Closure to JsonBuilder/StreamingJsonBuilder > - > > Key: GROOVY-7703 > URL: https://issues.apache.org/jira/browse/GROOVY-7703 > Project: Groovy > Issue Type: Improvement > Components: JSON >Affects Versions: 2.4.5 >Reporter: John Wagenleitner >Assignee: John Wagenleitner >Priority: Minor > Fix For: 2.4.6 > > > JsonBuilder and StreamingJsonBuilder currently support passing a > {{Collection}} and a {{Closure}}, the closure will be applied to each item in > the collection. An improvement would be to support the more general > {{Iterable}} type. > See https://github.com/apache/groovy/pull/203 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (GROOVY-7630) JsonSlurper LAX parser with invalid number
[ https://issues.apache.org/jira/browse/GROOVY-7630?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated GROOVY-7630: -- Fix Version/s: (was: 2.5.0-beta-1) > JsonSlurper LAX parser with invalid number > -- > > Key: GROOVY-7630 > URL: https://issues.apache.org/jira/browse/GROOVY-7630 > Project: Groovy > Issue Type: Bug > Components: JSON >Affects Versions: 2.4.5 > Environment: DISTRIB_ID=Ubuntu > DISTRIB_RELEASE=14.10 > DISTRIB_CODENAME=utopic > DISTRIB_DESCRIPTION="Ubuntu 14.10" > Linux 3.16.0-44-generic x86_64 >Reporter: Alan Hengle >Priority: Minor > Fix For: 2.4.6 > > > The JsonSlurper LAX parser parses an invalid number incorrectly: > {code:title=Example.java|borderStyle=solid} > import groovy.json.* > def obj = new JsonSlurper().setType(JsonParserType.LAX).parseText('{ "num": > 1a}') > println "1a: num = ${obj.num}" > println "1a: type is " + obj.num.class.name > obj = new JsonSlurper().setType(JsonParserType.LAX).parseText('{ "num": 1A}') > println "1A: num = ${obj.num}" > println "1A: type is " + obj.num.class.name > {code} > produces: > 1a: num = 59 > 1a: type is java.lang.Integer > 1A: num = 27 > 1A: type is java.lang.Integer > It seems like the parser should fail this as an invalid number, though one > could argue the LAX parser could interpret it as hex 1a, but neither is being > done. Valid numbers are of course parsed correctly. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (GROOVY-7707) StreamingJsonBuilder produces IllegalStateException when using unescaped output
[ https://issues.apache.org/jira/browse/GROOVY-7707?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated GROOVY-7707: -- Fix Version/s: (was: 2.5.0-beta-1) > StreamingJsonBuilder produces IllegalStateException when using unescaped > output > --- > > Key: GROOVY-7707 > URL: https://issues.apache.org/jira/browse/GROOVY-7707 > Project: Groovy > Issue Type: Bug >Affects Versions: 2.4.5 >Reporter: Graeme Rocher > Fix For: 2.4.6 > > > When writing unescaped JSON the state is not reset, resulting in an exception > if another entry is written. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Resolved] (GROOVY-7640) @Builder should include superclass properties
[ https://issues.apache.org/jira/browse/GROOVY-7640?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher resolved GROOVY-7640. --- Resolution: Fixed Fix Version/s: 2.5.0-beta-1 I merged the pull request with some updates. Thanks! > @Builder should include superclass properties > - > > Key: GROOVY-7640 > URL: https://issues.apache.org/jira/browse/GROOVY-7640 > Project: Groovy > Issue Type: Improvement >Reporter: Marc Bogaerts >Assignee: Pascal Schumacher > Fix For: 2.5.0-beta-1 > > > If one annotates a groovy class with @Builder and that class extends from > another class, then the generated builder does not support setting the parent > class properties. > This is especially problematic when mixin groovy builders in java code. > e.g. the following class shows what will and will not compile > {code:java} > // Animal.groovy > import groovy.transform.builder.Builder > import groovy.transform.builder.SimpleStrategy > @Builder(builderStrategy = SimpleStrategy) > class Animal { >String color > int legs > } > // Pet.groovy > import groovy.transform.builder.Builder > import groovy.transform.builder.SimpleStrategy > @Builder(builderStrategy = SimpleStrategy) > class Pet extends Animal { > String name > } > // PetTest.java > import org.junit.Test; > import static org.junit.Assert.*; > public class PetTest { > @Test public void createPet() { > // Pet pet = new Pet().setColor("white").setLegs(4).setName("Bobby"); > does not compile > Pet pet = (Pet) new > Pet().setName("Bobby").setColor("white").setLegs(4); > assertTrue(pet.getLegs() == 4); > } > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (GROOVY-7640) @Builder should have an option to include superclass properties
[ https://issues.apache.org/jira/browse/GROOVY-7640?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated GROOVY-7640: -- Summary: @Builder should have an option to include superclass properties (was: @Builder should include superclass properties) > @Builder should have an option to include superclass properties > --- > > Key: GROOVY-7640 > URL: https://issues.apache.org/jira/browse/GROOVY-7640 > Project: Groovy > Issue Type: Improvement >Reporter: Marc Bogaerts >Assignee: Pascal Schumacher > Fix For: 2.5.0-beta-1 > > > If one annotates a groovy class with @Builder and that class extends from > another class, then the generated builder does not support setting the parent > class properties. > This is especially problematic when mixin groovy builders in java code. > e.g. the following class shows what will and will not compile > {code:java} > // Animal.groovy > import groovy.transform.builder.Builder > import groovy.transform.builder.SimpleStrategy > @Builder(builderStrategy = SimpleStrategy) > class Animal { >String color > int legs > } > // Pet.groovy > import groovy.transform.builder.Builder > import groovy.transform.builder.SimpleStrategy > @Builder(builderStrategy = SimpleStrategy) > class Pet extends Animal { > String name > } > // PetTest.java > import org.junit.Test; > import static org.junit.Assert.*; > public class PetTest { > @Test public void createPet() { > // Pet pet = new Pet().setColor("white").setLegs(4).setName("Bobby"); > does not compile > Pet pet = (Pet) new > Pet().setName("Bobby").setColor("white").setLegs(4); > assertTrue(pet.getLegs() == 4); > } > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (GROOVY-7640) @Builder should include superclass properties
[ https://issues.apache.org/jira/browse/GROOVY-7640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15191197#comment-15191197 ] Pascal Schumacher commented on GROOVY-7640: --- For consistency with several other AST transforms, there is now an includeSuperProperties flag to turn on this behavior. > @Builder should include superclass properties > - > > Key: GROOVY-7640 > URL: https://issues.apache.org/jira/browse/GROOVY-7640 > Project: Groovy > Issue Type: Improvement >Reporter: Marc Bogaerts >Assignee: Pascal Schumacher > > If one annotates a groovy class with @Builder and that class extends from > another class, then the generated builder does not support setting the parent > class properties. > This is especially problematic when mixin groovy builders in java code. > e.g. the following class shows what will and will not compile > {code:java} > // Animal.groovy > import groovy.transform.builder.Builder > import groovy.transform.builder.SimpleStrategy > @Builder(builderStrategy = SimpleStrategy) > class Animal { >String color > int legs > } > // Pet.groovy > import groovy.transform.builder.Builder > import groovy.transform.builder.SimpleStrategy > @Builder(builderStrategy = SimpleStrategy) > class Pet extends Animal { > String name > } > // PetTest.java > import org.junit.Test; > import static org.junit.Assert.*; > public class PetTest { > @Test public void createPet() { > // Pet pet = new Pet().setColor("white").setLegs(4).setName("Bobby"); > does not compile > Pet pet = (Pet) new > Pet().setName("Bobby").setColor("white").setLegs(4); > assertTrue(pet.getLegs() == 4); > } > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (GROOVY-7640) @Builder should include superclass properties
[ https://issues.apache.org/jira/browse/GROOVY-7640?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated GROOVY-7640: -- Affects Version/s: (was: 2.4.5) Issue Type: Improvement (was: Bug) > @Builder should include superclass properties > - > > Key: GROOVY-7640 > URL: https://issues.apache.org/jira/browse/GROOVY-7640 > Project: Groovy > Issue Type: Improvement >Reporter: Marc Bogaerts >Assignee: Pascal Schumacher > > If one annotates a groovy class with @Builder and that class extends from > another class, then the generated builder does not support setting the parent > class properties. > This is especially problematic when mixin groovy builders in java code. > e.g. the following class shows what will and will not compile > {code:java} > // Animal.groovy > import groovy.transform.builder.Builder > import groovy.transform.builder.SimpleStrategy > @Builder(builderStrategy = SimpleStrategy) > class Animal { >String color > int legs > } > // Pet.groovy > import groovy.transform.builder.Builder > import groovy.transform.builder.SimpleStrategy > @Builder(builderStrategy = SimpleStrategy) > class Pet extends Animal { > String name > } > // PetTest.java > import org.junit.Test; > import static org.junit.Assert.*; > public class PetTest { > @Test public void createPet() { > // Pet pet = new Pet().setColor("white").setLegs(4).setName("Bobby"); > does not compile > Pet pet = (Pet) new > Pet().setName("Bobby").setColor("white").setLegs(4); > assertTrue(pet.getLegs() == 4); > } > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (GROOVY-7640) @Builder should include superclass properties
[ https://issues.apache.org/jira/browse/GROOVY-7640?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated GROOVY-7640: -- Assignee: Pascal Schumacher Priority: Major (was: Minor) Component/s: (was: ast builder) Summary: @Builder should include superclass properties (was: AST Builder should include superclass properties) > @Builder should include superclass properties > - > > Key: GROOVY-7640 > URL: https://issues.apache.org/jira/browse/GROOVY-7640 > Project: Groovy > Issue Type: Bug >Affects Versions: 2.4.5 >Reporter: Marc Bogaerts >Assignee: Pascal Schumacher > > If one annotates a groovy class with @Builder and that class extends from > another class, then the generated builder does not support setting the parent > class properties. > This is especially problematic when mixin groovy builders in java code. > e.g. the following class shows what will and will not compile > {code:java} > // Animal.groovy > import groovy.transform.builder.Builder > import groovy.transform.builder.SimpleStrategy > @Builder(builderStrategy = SimpleStrategy) > class Animal { >String color > int legs > } > // Pet.groovy > import groovy.transform.builder.Builder > import groovy.transform.builder.SimpleStrategy > @Builder(builderStrategy = SimpleStrategy) > class Pet extends Animal { > String name > } > // PetTest.java > import org.junit.Test; > import static org.junit.Assert.*; > public class PetTest { > @Test public void createPet() { > // Pet pet = new Pet().setColor("white").setLegs(4).setName("Bobby"); > does not compile > Pet pet = (Pet) new > Pet().setName("Bobby").setColor("white").setLegs(4); > assertTrue(pet.getLegs() == 4); > } > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (GROOVY-4659) GroovyDoc omits closure parameters
[ https://issues.apache.org/jira/browse/GROOVY-4659?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated GROOVY-4659: -- Summary: GroovyDoc omits closure parameters (was: javadoc omits closure parameters) > GroovyDoc omits closure parameters > --- > > Key: GROOVY-4659 > URL: https://issues.apache.org/jira/browse/GROOVY-4659 > Project: Groovy > Issue Type: Bug > Components: GroovyDoc >Affects Versions: 1.7.6 > Environment: groovy 1.7.6 (grails 1.3.6) >Reporter: Patrick Huber > > running grails doc does generate the doc but in most closures i actually use > typed arguments as in "def closure = { MyOwnClass arg -> ... }" and I'd like > groovydoc to automatically link to "MyOwnClass", same as it happens with a > plain java method... > So my current workaround to get a reasonable javadoc out of my code goes like > this: > {code} > /** > * my documentation > */ > public void myMethod(SomeClass arg) {} > def myMethod = { SomeClass arg -> > // actual code > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Closed] (GROOVY-6880) Please add Inline AST Transform
[ https://issues.apache.org/jira/browse/GROOVY-6880?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher closed GROOVY-6880. - Resolution: Won't Fix Closing this after reading Cédrics comment. > Please add Inline AST Transform > --- > > Key: GROOVY-6880 > URL: https://issues.apache.org/jira/browse/GROOVY-6880 > Project: Groovy > Issue Type: Improvement > Components: xforms >Reporter: Suminda Dharmasena >Priority: Minor > > Kotlin has also added inline support. This would be a very useful feature for > performance sensitive code. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Closed] (GROOVY-6881) Improve Builder AST Transform for Existing Mutable Objects
[ https://issues.apache.org/jira/browse/GROOVY-6881?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher closed GROOVY-6881. - Resolution: Won't Fix After reading the discussion it seems like this is unnecessary. > Improve Builder AST Transform for Existing Mutable Objects > -- > > Key: GROOVY-6881 > URL: https://issues.apache.org/jira/browse/GROOVY-6881 > Project: Groovy > Issue Type: Improvement > Components: xforms >Reporter: Suminda Dharmasena >Priority: Minor > > It would be good to improve the builder AST transform for other strategies > than the Simple Strategy where you can use the pattern to re mutate an > existing object. > Also to reconfigure any existing initialisers (without creating new objects) > to be used to either create new objects or mutate mutable objects. > The above can help reduce memory pressure in and application and GC overhead > in performance sensitive applications. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Closed] (GROOVY-6136) Possibly memory leak in Eval with PathExpression
[ https://issues.apache.org/jira/browse/GROOVY-6136?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher closed GROOVY-6136. - Resolution: Duplicate > Possibly memory leak in Eval with PathExpression > > > Key: GROOVY-6136 > URL: https://issues.apache.org/jira/browse/GROOVY-6136 > Project: Groovy > Issue Type: Bug > Components: groovy-jdk >Affects Versions: 2.0.7, 2.1.3 > Environment: JDK 1.6, JDK 1.7 with JVM Option: > -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled > -XX:+TraceClassUnloading -XX:+TraceClassLoading >Reporter: Donghun Lee > Attachments: EvalTest.zip > > > Possibly PermGen memory leak in eval. > It loads Script class every execution of eval but never unloads and triggers > "java.lang.OutOfMemoryError: PermGen space" error. > I performed GC manually by JVisualVM among the time but no effect on PermGen > space (works well on Heap). > Here are the ClassLoading/Unloading trace log: > ... > [Loaded sun.reflect.GeneratedMethodAccessor24 from __JVM_DefineClass__] > [Loaded sun.reflect.GeneratedMethodAccessor25 from __JVM_DefineClass__] > [Loaded Script1 from file:/groovy/shell] > [Loaded Script1 from file:/groovy/shell] > [Loaded Script1 from file:/groovy/shell] > [Loaded Script1 from file:/groovy/shell] > [Loaded sun.reflect.GeneratedMethodAccessor26 from __JVM_DefineClass__] > [Loaded Script1 from file:/groovy/shell] > [Loaded Script1 from file:/groovy/shell] > [Loaded Script1 from file:/groovy/shell] > [Loaded Script1 from file:/groovy/shell] -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Closed] (GROOVY-2330) GString vs String equality in collections
[ https://issues.apache.org/jira/browse/GROOVY-2330?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher closed GROOVY-2330. - Resolution: Fixed Close after reading Jochens comments. > GString vs String equality in collections > - > > Key: GROOVY-2330 > URL: https://issues.apache.org/jira/browse/GROOVY-2330 > Project: Groovy > Issue Type: Sub-task > Components: groovy-runtime >Affects Versions: 1.1-rc-3 >Reporter: Hans Dockter > > GStrings are one of the big groovy features. But there current equals > behavior in collections makes them useless for many use cases. Very confusing > is also the behavioral difference between lists and other collections. > All tests fail except the first one. (Tests run against rev 9408) > {code} > class StringVersusGStringEqualsInCollections extends GroovyTestCase { > String string > GString gString > void setUp() { > def g = 'g' > string = 'groovy' > gString = "${g}roovy" > } > void testEqualsInList() { > assertEquals([string], [gString]) > } > void testEqualsInSet() { > assertEquals([string] as Set, [gString] as Set) > } > void testKeyEqualsInMap() { > String someValue = 'somevalue' > Map stringMap = [(string): someValue] > Map gStringMap = [(gString): someValue] > assertEquals(stringMap, gStringMap) > } > void testValueEqualsInMap() { > String someKey = 'somekey' > Map stringMap = [(someKey): string] > Map gStringMap = [(someKey): gString] > assertEquals(stringMap, gStringMap) > } > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (GROOVY-7469) ClassCastException in groovy 2.3.10. See description section for more information
[ https://issues.apache.org/jira/browse/GROOVY-7469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15185597#comment-15185597 ] Pascal Schumacher commented on GROOVY-7469: --- Sorry for the late reply, but without a self-contained script this is impossible to replicate. > ClassCastException in groovy 2.3.10. See description section for more > information > - > > Key: GROOVY-7469 > URL: https://issues.apache.org/jira/browse/GROOVY-7469 > Project: Groovy > Issue Type: Bug >Affects Versions: 2.3.10 >Reporter: Vijaykumar > Labels: usertask > > Hi Team, > I'm facing an issue with groovy version 2.3.10. I'm doing the version upgrade > from 2.2.2 to 2.3.10. > The existing code is working in groovy 2.2.2 and the same code throws an > exception (ClassCastException) in groovy 2.3.10. > //FoodItem Class -- start > Class FoodItem extends Item > { > static Construct builder() { > new Construct() > } > static class Construct > { > Item.Construct build > Construct() { > build = new Item.Construct() { } >} >FoodItem build() { > new FoodItem (build.map) // This line throws the classcastexception > } > } > //FoodItem Class -- End > // Item class -- start > abstract class Item > { > protected TreeMap map > protected Item() { > this.map = [:] > } > protected Item(TreeMap map) { > this.map = [:] > if (map != null) { > this.map = map > } > } > protected Item(Map map) { > this.map = [:] > if (map != null) { > this.map = new TreeMap(map) > } > } > TreeMap getMap() { this.map } > abstract protected static class Construct { > protected TreeMap map > protected Construct() { > this.map = [:] > } > protected Construct(Item item) { > this.map = item.map as TreeMap > } > } > // Item class -- End -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (GROOVY-7469) ClassCastException in groovy 2.3.10. See description section for more information
[ https://issues.apache.org/jira/browse/GROOVY-7469?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated GROOVY-7469: -- Labels: usertask (was: ) > ClassCastException in groovy 2.3.10. See description section for more > information > - > > Key: GROOVY-7469 > URL: https://issues.apache.org/jira/browse/GROOVY-7469 > Project: Groovy > Issue Type: Bug >Affects Versions: 2.3.10 >Reporter: Vijaykumar > Labels: usertask > > Hi Team, > I'm facing an issue with groovy version 2.3.10. I'm doing the version upgrade > from 2.2.2 to 2.3.10. > The existing code is working in groovy 2.2.2 and the same code throws an > exception (ClassCastException) in groovy 2.3.10. > //FoodItem Class -- start > Class FoodItem extends Item > { > static Construct builder() { > new Construct() > } > static class Construct > { > Item.Construct build > Construct() { > build = new Item.Construct() { } >} >FoodItem build() { > new FoodItem (build.map) // This line throws the classcastexception > } > } > //FoodItem Class -- End > // Item class -- start > abstract class Item > { > protected TreeMap map > protected Item() { > this.map = [:] > } > protected Item(TreeMap map) { > this.map = [:] > if (map != null) { > this.map = map > } > } > protected Item(Map map) { > this.map = [:] > if (map != null) { > this.map = new TreeMap(map) > } > } > TreeMap getMap() { this.map } > abstract protected static class Construct { > protected TreeMap map > protected Construct() { > this.map = [:] > } > protected Construct(Item item) { > this.map = item.map as TreeMap > } > } > // Item class -- End -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (GROOVY-7489) List All Nodes +/-n levels from current node
[ https://issues.apache.org/jira/browse/GROOVY-7489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated GROOVY-7489: -- Labels: (was: usertask) > List All Nodes +/-n levels from current node > > > Key: GROOVY-7489 > URL: https://issues.apache.org/jira/browse/GROOVY-7489 > Project: Groovy > Issue Type: Improvement > Components: groovy-jdk >Reporter: Suminda Dharmasena >Priority: Minor > > Ability to query nodes at +/- n levels from the current level. If n = 0 then > nodes at current level. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Closed] (GROOVY-7481) Update to Groovy 2.4.3 breaks existing code
[ https://issues.apache.org/jira/browse/GROOVY-7481?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher closed GROOVY-7481. - Resolution: Not A Bug I'm closing this after reading Pauls comment. > Update to Groovy 2.4.3 breaks existing code > --- > > Key: GROOVY-7481 > URL: https://issues.apache.org/jira/browse/GROOVY-7481 > Project: Groovy > Issue Type: Bug > Components: groovy-runtime >Affects Versions: 2.4.3 >Reporter: Alexander Veit > > After update to Groovy 2.4.3 coll.addAll() fails for null values. > groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method > our.package.OurCollection#addAll. > Cannot resolve which method to invoke for [null] due to overlapping > prototypes between: > [interface java.util.Collection] > [interface java.lang.Iterable] > [interface java.util.Iterator] > at > groovy.lang.MetaClassImpl.chooseMostSpecificParams(MetaClassImpl.java:3238) > at > groovy.lang.MetaClassImpl.chooseMethodInternal(MetaClassImpl.java:3191) > at groovy.lang.MetaClassImpl.chooseMethod(MetaClassImpl.java:3134) > at > groovy.lang.MetaClassImpl.getMethodWithCachingInternal(MetaClassImpl.java:1325) > at groovy.lang.MetaClassImpl.createPojoCallSite(MetaClassImpl.java:3367) > at > org.codehaus.groovy.runtime.callsite.CallSiteArray.createPojoSite(CallSiteArray.java:129) > at > org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallSite(CallSiteArray.java:163) > at > org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45) > at > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:110) > at > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:122) > at test.run(test.groovy:62) > at groovy.lang.GroovyShell.evaluate(GroovyShell.java:589) > at groovy.lang.GroovyShell.evaluate(GroovyShell.java:636) > ... -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Closed] (GROOVY-7489) List All Nodes +/-n levels from current node
[ https://issues.apache.org/jira/browse/GROOVY-7489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher closed GROOVY-7489. - Resolution: Incomplete > List All Nodes +/-n levels from current node > > > Key: GROOVY-7489 > URL: https://issues.apache.org/jira/browse/GROOVY-7489 > Project: Groovy > Issue Type: Improvement > Components: groovy-jdk >Reporter: Suminda Dharmasena >Priority: Minor > Labels: usertask > > Ability to query nodes at +/- n levels from the current level. If n = 0 then > nodes at current level. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (GROOVY-7661) Option to consume BOM if present
[ https://issues.apache.org/jira/browse/GROOVY-7661?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated GROOVY-7661: -- Assignee: (was: Keegan Witt) > Option to consume BOM if present > > > Key: GROOVY-7661 > URL: https://issues.apache.org/jira/browse/GROOVY-7661 > Project: Groovy > Issue Type: Improvement >Reporter: Keegan Witt > > Add an argument to IOGroovyMethods and NIOGroovyMethods to consume the BOM if > present, similar to Common IO's > [BOMInputStream|https://commons.apache.org/proper/commons-io/apidocs/org/apache/commons/io/input/BOMInputStream.html]. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Closed] (GROOVY-7725) compatibility issue of class groovy.lang.IntRange
[ https://issues.apache.org/jira/browse/GROOVY-7725?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher closed GROOVY-7725. - Resolution: Not A Bug I'm closing this after reading [~paulk]s comment. > compatibility issue of class groovy.lang.IntRange > - > > Key: GROOVY-7725 > URL: https://issues.apache.org/jira/browse/GROOVY-7725 > Project: Groovy > Issue Type: Bug > Components: groovy-runtime, GroovyScriptEngine >Affects Versions: 2.4.5 >Reporter: ZENG Jipeng > > Hi, > We are using the class groovy.lang.IntRange in our code to get the sub > string, everything is working fine. Recently, we upgrade the groovy version > from 1.7.8 to 2.4.5, but the the code is no more working with an error > message "java.lang.IllegalStateException: Should not call subListBorders on a > non-inclusive aware IntRange". Here are the sample codes, > {quote} > def name = "this is a test"; > IntRange range = new IntRange(5,6); > return name.getAt(range); > {quote} > In the version 1.7.8, it can successfully return "is". > I read the groovy api document and found the constructor of IntRange seems > have some changes, so I change the code, > {quote} > def name = "this is a test"; > IntRange range = new IntRange(*true*,5,6); > return name.getAt(range); > {quote} > And it can work well again in the version 2.4.5. > So, this looks like a compatibility issue to me, is this a known issue? Is > there anyway to solve this without modify the source code? Thanks. > BR, > Jipeng -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Closed] (GROOVY-7727) Cannot create unicode sequences using \Uxxxxxx
[ https://issues.apache.org/jira/browse/GROOVY-7727?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher closed GROOVY-7727. - Resolution: Not A Bug Closing this after reading [~anshbansal]s comment. > Cannot create unicode sequences using \Uxx > -- > > Key: GROOVY-7727 > URL: https://issues.apache.org/jira/browse/GROOVY-7727 > Project: Groovy > Issue Type: Bug > Components: Compiler >Affects Versions: 2.4.5 >Reporter: Andres Almiray > > According to > http://www.oracle.com/technetwork/articles/java/supplementary-142654.html > "For text input, the Java 2 SDK provides a code point input method which > accepts strings of the form "\Uxx", where the uppercase "U" indicates > that the escape sequence contains six hexadecimal digits, thus allowing for > supplementary characters. A lowercase "u" indicates the original form of the > escape sequences, "\u". You can find this input method and its > documentation in the directory demo/jfc/CodePointIM of the J2SDK." > The following code fails with a syntax exception > s = "\U01f5d0" -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (GROOVY-7768) groovy.sql.Sql callWithAllRows returns blank result when passing params
[ https://issues.apache.org/jira/browse/GROOVY-7768?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated GROOVY-7768: -- Component/s: (was: groovy-jdk) SQL processing > groovy.sql.Sql callWithAllRows returns blank result when passing params > --- > > Key: GROOVY-7768 > URL: https://issues.apache.org/jira/browse/GROOVY-7768 > Project: Groovy > Issue Type: Bug > Components: SQL processing >Affects Versions: 2.4.0 >Reporter: Ryan Mills > Original Estimate: 5h > Remaining Estimate: 5h > > callWithAllRows works with regular sql, and an empty list. > call works with a map or list > Howver, callWithAllRows returns an empty list when using with params eg.) > List list = new ArrayList(); > l.add("myid"); > sql.callWithAllRows("sp_who ?", list, {}); > result is [] -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (GROOVY-7562) imports and custom class defs not working in Groovysh Interpreter Mode
[ https://issues.apache.org/jira/browse/GROOVY-7562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15183582#comment-15183582 ] Pascal Schumacher commented on GROOVY-7562: --- The pull request contains some changes which are binary incompatible. Groovysh classes are not really an api, but it's better to be careful with changes like this, especially in a bugfix release. Therefore the change is 2.5 only. > imports and custom class defs not working in Groovysh Interpreter Mode > -- > > Key: GROOVY-7562 > URL: https://issues.apache.org/jira/browse/GROOVY-7562 > Project: Groovy > Issue Type: Bug > Components: Groovysh >Affects Versions: 2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.4.4 >Reporter: Thibault Kruse > Fix For: 2.5.0-beta-1 > > > To reproduce > {code} > groovy:000> :set interpreterMode true > groovy:000> class Me { String name } > ===> true > groovy:000> m = new Me() > script14405523893121089774169.groovy: 2: unable to resolve class Me > groovy:000> import java.rmi.Remote > ===> java.rmi.Remote > groovy:000> Remote x > script1440757530265448239810.groovy: 1: unable to resolve class Remote > @ line 1, column 8. >Remote x > {code} > See https://github.com/apache/incubator-groovy/pull/100 for fix -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (GROOVY-7755) Add Extension Methods for JAXB Marshalling and Unmarshalling Suppport
[ https://issues.apache.org/jira/browse/GROOVY-7755?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated GROOVY-7755: -- Component/s: XML Processing > Add Extension Methods for JAXB Marshalling and Unmarshalling Suppport > - > > Key: GROOVY-7755 > URL: https://issues.apache.org/jira/browse/GROOVY-7755 > Project: Groovy > Issue Type: New Feature > Components: XML Processing >Reporter: Pascal Schumacher >Assignee: Pascal Schumacher > Fix For: 2.5.0-beta-1 > > > see pull request: https://github.com/apache/groovy/pull/255 for details -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Resolved] (GROOVY-7755) Add Extension Methods for JAXB Marshalling and Unmarshalling Suppport
[ https://issues.apache.org/jira/browse/GROOVY-7755?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher resolved GROOVY-7755. --- Resolution: Fixed Assignee: Pascal Schumacher Fix Version/s: 2.5.0-beta-1 Pull request merged. Thanks! > Add Extension Methods for JAXB Marshalling and Unmarshalling Suppport > - > > Key: GROOVY-7755 > URL: https://issues.apache.org/jira/browse/GROOVY-7755 > Project: Groovy > Issue Type: New Feature >Reporter: Pascal Schumacher >Assignee: Pascal Schumacher > Fix For: 2.5.0-beta-1 > > > see pull request: https://github.com/apache/groovy/pull/255 for details -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (GROOVY-7755) Add Extension Methods for JAXB Marshalling and Unmarshalling Suppport
[ https://issues.apache.org/jira/browse/GROOVY-7755?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated GROOVY-7755: -- Summary: Add Extension Methods for JAXB Marshalling and Unmarshalling Suppport (was: Add Extension Methods for JAXB Marshalling and Unmarschalling Suppport) > Add Extension Methods for JAXB Marshalling and Unmarshalling Suppport > - > > Key: GROOVY-7755 > URL: https://issues.apache.org/jira/browse/GROOVY-7755 > Project: Groovy > Issue Type: New Feature >Reporter: Pascal Schumacher > > see pull request: https://github.com/apache/groovy/pull/255 for details -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (GROOVY-7044) Cloned NodeBuilder created nodes share values (child nodes) with original node.
[ https://issues.apache.org/jira/browse/GROOVY-7044?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15182277#comment-15182277 ] Pascal Schumacher commented on GROOVY-7044: --- [~paulk] What do you think? Is this a bug or a feature? Should we merge the pull request? > Cloned NodeBuilder created nodes share values (child nodes) with original > node. > --- > > Key: GROOVY-7044 > URL: https://issues.apache.org/jira/browse/GROOVY-7044 > Project: Groovy > Issue Type: Bug > Components: groovy-jdk, XML Processing >Affects Versions: 2.3.6 >Reporter: Damir Perovi? >Priority: Minor > Attachments: NodeBuilderTest.groovy > > > Cloning nodes created by NodeBuilder share child nodes with original node. > If node is added to original node or child node value is changed, the cloned > node will see those changes. Same applies to cloned node, adding node or > changing child node value will be seen by original node. > The problem seem to originate in NodeBuilder methods: > {code} > protected Object createNode(Object name) > protected Object createNode(Object name, Map attributes) > {code} > which use ArrayList when creating new Node instead of NodeList. > Can be easily reproduced by groovysh or use attached junit file. > {noformat} > groovy:000> x1 = new NodeBuilder().a() { b() } > ===> a[attributes={}; value=[b[attributes={}; value=[ > groovy:000> x2 = x1.clone() > ===> a[attributes={}; value=[b[attributes={}; value=[ > groovy:000> x1.appendNode('c') > ===> c[attributes={}; value=[]] > groovy:000> x1 > ===> a[attributes={}; value=[b[attributes={}; value=[]], c[attributes={}; > value=[ > groovy:000> x2 > ===> a[attributes={}; value=[b[attributes={}; value=[]], c[attributes={}; > value=[ > groovy:000> x1.b[0].setValue(1) > ===> null > groovy:000> x1 > ===> a[attributes={}; value=[b[attributes={}; value=1], c[attributes={}; > value=[ > groovy:000> x2 > ===> a[attributes={}; value=[b[attributes={}; value=1], c[attributes={}; > value=[ > groovy:000> x2.c[0].setValue(2) > ===> null > groovy:000> x1 > ===> a[attributes={}; value=[b[attributes={}; value=1], c[attributes={}; > value=2]]] > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (GROOVY-7780) JSONBuilder/JSONSlurper: Option to Only Include NonNull values
[ https://issues.apache.org/jira/browse/GROOVY-7780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated GROOVY-7780: -- Description: requested on the mailing list, by Gerald Wiltse: {quote}I just found this article which describes the problem perfectly and there are several good workarounds. http://stackoverflow.com/questions/14749817/exclude-null-values-using-jsonbuilder-in-groovy Apparently, it's a native feature of Jackson, which makes me think it's probably available in lots of JSON API's. Any chance this feature could get on the roadmap for JSON Builder (and slurper for that matter)?{quote} was: from the mailing list, by Gerald Wiltse: {quote}I just found this article which describes the problem perfectly and there are several good workarounds. http://stackoverflow.com/questions/14749817/exclude-null-values-using-jsonbuilder-in-groovy Apparently, it's a native feature of Jackson, which makes me think it's probably available in lots of JSON API's. Any chance this feature could get on the roadmap for JSON Builder (and slurper for that matter)?{quote} > JSONBuilder/JSONSlurper: Option to Only Include NonNull values > --- > > Key: GROOVY-7780 > URL: https://issues.apache.org/jira/browse/GROOVY-7780 > Project: Groovy > Issue Type: Improvement > Components: JSON >Reporter: Pascal Schumacher > > requested on the mailing list, by Gerald Wiltse: > {quote}I just found this article which describes the problem perfectly and > there are several good workarounds. > http://stackoverflow.com/questions/14749817/exclude-null-values-using-jsonbuilder-in-groovy > Apparently, it's a native feature of Jackson, which makes me think it's > probably available in lots of JSON API's. > Any chance this feature could get on the roadmap for JSON Builder (and > slurper for that matter)?{quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (GROOVY-7780) JSONBuilder/JSONSlurper: Option to Only Include NonNull values
[ https://issues.apache.org/jira/browse/GROOVY-7780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated GROOVY-7780: -- Description: from the mailing list, by Gerald Wiltse: {quote}I just found this article which describes the problem perfectly and there are several good workarounds. http://stackoverflow.com/questions/14749817/exclude-null-values-using-jsonbuilder-in-groovy Apparently, it's a native feature of Jackson, which makes me think it's probably available in lots of JSON API's. Any chance this feature could get on the roadmap for JSON Builder (and slurper for that matter)?{quote} was: from the mailing list, by Gerald Wiltse: {qoute}I just found this article which describes the problem perfectly and there are several good workarounds. http://stackoverflow.com/questions/14749817/exclude-null-values-using-jsonbuilder-in-groovy Apparently, it's a native feature of Jackson, which makes me think it's probably available in lots of JSON API's. Any chance this feature could get on the roadmap for JSON Builder (and slurper for that matter)?{quote} > JSONBuilder/JSONSlurper: Option to Only Include NonNull values > --- > > Key: GROOVY-7780 > URL: https://issues.apache.org/jira/browse/GROOVY-7780 > Project: Groovy > Issue Type: Improvement > Components: JSON >Reporter: Pascal Schumacher > > from the mailing list, by Gerald Wiltse: > {quote}I just found this article which describes the problem perfectly and > there are several good workarounds. > http://stackoverflow.com/questions/14749817/exclude-null-values-using-jsonbuilder-in-groovy > Apparently, it's a native feature of Jackson, which makes me think it's > probably available in lots of JSON API's. > Any chance this feature could get on the roadmap for JSON Builder (and > slurper for that matter)?{quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (GROOVY-7780) JSONBuilder/JSONSlurper: Option to Only Include NonNull values
Pascal Schumacher created GROOVY-7780: - Summary: JSONBuilder/JSONSlurper: Option to Only Include NonNull values Key: GROOVY-7780 URL: https://issues.apache.org/jira/browse/GROOVY-7780 Project: Groovy Issue Type: Improvement Components: JSON Reporter: Pascal Schumacher from the mailing list, by Gerald Wiltse: {qoute}I just found this article which describes the problem perfectly and there are several good workarounds. http://stackoverflow.com/questions/14749817/exclude-null-values-using-jsonbuilder-in-groovy Apparently, it's a native feature of Jackson, which makes me think it's probably available in lots of JSON API's. Any chance this feature could get on the roadmap for JSON Builder (and slurper for that matter)?{quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Closed] (GROOVY-7743) Download page must link to ASF mirrors for sources
[ https://issues.apache.org/jira/browse/GROOVY-7743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher closed GROOVY-7743. - Resolution: Fixed Fixed again. Thanks for reporting. > Download page must link to ASF mirrors for sources > -- > > Key: GROOVY-7743 > URL: https://issues.apache.org/jira/browse/GROOVY-7743 > Project: Groovy > Issue Type: Bug > Environment: https://dist.apache.org/repos/dist/release/groovy/ >Reporter: Sebb >Assignee: Pascal Schumacher >Priority: Blocker > > The ASF requires that projects release source through the ASF mirror system > [1] > However I could not find any links to the source from the website. > [1] http://www.apache.org/dev/release-publishing.html#distribution -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (GROOVY-7776) Grape barfs on item in maven-central
[ https://issues.apache.org/jira/browse/GROOVY-7776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15178341#comment-15178341 ] Pascal Schumacher commented on GROOVY-7776: --- Hi Paul, I guess this either related to java 9 (groovy only runs on some of the early access builds) or to your environment, because it works for me: {quote}grape -V resolve com.jcraft jzlib 1.1.3 ... downloading https://jcenter.bintray.com/com/jcraft/jzlib/1.1.3/jzlib-1.1.3.jar ... jcenter: downloading https://jcenter.bintray.com/com/jcraft/jzlib/1.1.3/jzlib-1.1.3.jar jcenter: downloading https://jcenter.bintray.com/com/jcraft/jzlib/1.1.3/jzlib-1.1.3.jar.sha1 sha1 OK for https://jcenter.bintray.com/com/jcraft/jzlib/1.1.3/jzlib-1.1.3.jar [SUCCESSFUL ] com.jcraft#jzlib;1.1.3!jzlib.jar (952ms) resolve done (4087ms resolve - 952ms download){quote} Please try with Java 6/7/8. If that does not work maybe additional logging as described in [http://docs.groovy-lang.org/latest/html/documentation/grape.html#Grape-Logging] can help you diagnose the problem. > Grape barfs on item in maven-central > > > Key: GROOVY-7776 > URL: https://issues.apache.org/jira/browse/GROOVY-7776 > Project: Groovy > Issue Type: Bug > Components: Grape >Affects Versions: 2.4.6 > Environment: Mac, Groovy installed via homebrew >Reporter: Paul Hammant > > {code:title=How to Reproduce|borderStyle=solid} > $ grape --version > Groovy Version: 2.4.6 JVM: 1.9.0-ea > $ rm -rf ~/.m2/repository/com/jcraft > $ rm -rf ~/.ivy2/cache/ > $ rm -rf ~/.groovy/grapes/ > $ grape -V resolve com.jcraft jzlib 1.1.3 > {code} > Yields: > {code} > Error in resolve: > Error grabbing Grapes -- [download failed: > com.jcraft#jzlib;1.1.3!jzlib.jar] > {code} > I can reproduce this on two Macs. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (GROOVY-7777) groovysh cannot load script with shebang
[ https://issues.apache.org/jira/browse/GROOVY-?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated GROOVY-: -- Affects Version/s: 2.4.6 > groovysh cannot load script with shebang > > > Key: GROOVY- > URL: https://issues.apache.org/jira/browse/GROOVY- > Project: Groovy > Issue Type: Bug > Components: Groovysh >Affects Versions: 2.4.6 >Reporter: paul > > The following file runs nicely when executing {{$ ./shebang.groovy}} : > {code:title=shebang.groovy|borderStyle=solid} > #!/usr/bin/env groovy > println "Hello from the Shebang" > {code} > But, loading that file into groovysh results in: > {{$ groovysh shebang.groovy}} > {{groovysh_parse: 2: unexpected char: '#' @ line 2, column 1.}} > tested under Ubuntu14.04 with Groovy 2.4.6 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (GROOVY-7777) groovysh cannot load script with shebang
[ https://issues.apache.org/jira/browse/GROOVY-?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated GROOVY-: -- Component/s: Groovysh > groovysh cannot load script with shebang > > > Key: GROOVY- > URL: https://issues.apache.org/jira/browse/GROOVY- > Project: Groovy > Issue Type: Bug > Components: Groovysh >Affects Versions: 2.4.6 >Reporter: paul > > The following file runs nicely when executing {{$ ./shebang.groovy}} : > {code:title=shebang.groovy|borderStyle=solid} > #!/usr/bin/env groovy > println "Hello from the Shebang" > {code} > But, loading that file into groovysh results in: > {{$ groovysh shebang.groovy}} > {{groovysh_parse: 2: unexpected char: '#' @ line 2, column 1.}} > tested under Ubuntu14.04 with Groovy 2.4.6 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Closed] (GROOVY-7771) Exception driven control flow in groovy.lang.Script.getProperty()
[ https://issues.apache.org/jira/browse/GROOVY-7771?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher closed GROOVY-7771. - Resolution: Won't Fix [~graben] Sorry about this, but backdrag is right, this breaks existing code and we can not remove a feature for a performance improvement. > Exception driven control flow in groovy.lang.Script.getProperty() > - > > Key: GROOVY-7771 > URL: https://issues.apache.org/jira/browse/GROOVY-7771 > Project: Groovy > Issue Type: Bug >Affects Versions: 2.4.6 >Reporter: Benjamin Graf >Assignee: Pascal Schumacher > Labels: breaking > > groovy.lang.Script.getProperty() calls Binding.getProperty() and does > therfore react on MissingPropertyException. This control flow is an > antipattern causing unnecessary Throwable.fillInStackTrace() calls which cost > cpu time. It might be better to check with Binding.hasProperty() first to > avoid Exception flow. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (GROOVY-7771) Exception driven control flow in groovy.lang.Script.getProperty()
[ https://issues.apache.org/jira/browse/GROOVY-7771?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated GROOVY-7771: -- Labels: breaking (was: ) > Exception driven control flow in groovy.lang.Script.getProperty() > - > > Key: GROOVY-7771 > URL: https://issues.apache.org/jira/browse/GROOVY-7771 > Project: Groovy > Issue Type: Bug >Affects Versions: 2.4.6 >Reporter: Benjamin Graf >Assignee: Pascal Schumacher > Labels: breaking > > groovy.lang.Script.getProperty() calls Binding.getProperty() and does > therfore react on MissingPropertyException. This control flow is an > antipattern causing unnecessary Throwable.fillInStackTrace() calls which cost > cpu time. It might be better to check with Binding.hasProperty() first to > avoid Exception flow. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Reopened] (GROOVY-7771) Exception driven control flow in groovy.lang.Script.getProperty()
[ https://issues.apache.org/jira/browse/GROOVY-7771?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher reopened GROOVY-7771: --- Patch causes two test to fail: [https://travis-ci.org/apache/groovy/jobs/112466659]. So I guess the old behavior is needed. Further investigation required. > Exception driven control flow in groovy.lang.Script.getProperty() > - > > Key: GROOVY-7771 > URL: https://issues.apache.org/jira/browse/GROOVY-7771 > Project: Groovy > Issue Type: Bug >Affects Versions: 2.4.6 >Reporter: Benjamin Graf >Assignee: Pascal Schumacher > > groovy.lang.Script.getProperty() calls Binding.getProperty() and does > therfore react on MissingPropertyException. This control flow is an > antipattern causing unnecessary Throwable.fillInStackTrace() calls which cost > cpu time. It might be better to check with Binding.hasProperty() first to > avoid Exception flow. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (GROOVY-7771) Exception driven control flow in groovy.lang.Script.getProperty()
[ https://issues.apache.org/jira/browse/GROOVY-7771?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated GROOVY-7771: -- Fix Version/s: (was: 2.4.7) > Exception driven control flow in groovy.lang.Script.getProperty() > - > > Key: GROOVY-7771 > URL: https://issues.apache.org/jira/browse/GROOVY-7771 > Project: Groovy > Issue Type: Bug >Affects Versions: 2.4.6 >Reporter: Benjamin Graf >Assignee: Pascal Schumacher > > groovy.lang.Script.getProperty() calls Binding.getProperty() and does > therfore react on MissingPropertyException. This control flow is an > antipattern causing unnecessary Throwable.fillInStackTrace() calls which cost > cpu time. It might be better to check with Binding.hasProperty() first to > avoid Exception flow. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Resolved] (GROOVY-7771) Exception driven control flow in groovy.lang.Script.getProperty()
[ https://issues.apache.org/jira/browse/GROOVY-7771?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher resolved GROOVY-7771. --- Resolution: Fixed Assignee: Pascal Schumacher Fix Version/s: 2.4.7 Patch applied. Thanks! > Exception driven control flow in groovy.lang.Script.getProperty() > - > > Key: GROOVY-7771 > URL: https://issues.apache.org/jira/browse/GROOVY-7771 > Project: Groovy > Issue Type: Bug >Affects Versions: 2.4.6 >Reporter: Benjamin Graf >Assignee: Pascal Schumacher > Fix For: 2.4.7 > > > groovy.lang.Script.getProperty() calls Binding.getProperty() and does > therfore react on MissingPropertyException. This control flow is an > antipattern causing unnecessary Throwable.fillInStackTrace() calls which cost > cpu time. It might be better to check with Binding.hasProperty() first to > avoid Exception flow. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (GROOVY-7769) Allow @Delegate Annotation on a getter
[ https://issues.apache.org/jira/browse/GROOVY-7769?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated GROOVY-7769: -- Description: See [https://github.com/apache/groovy/pull/265] for details. (was: See [https://github.com/apache/groovy/pull/265| pull request] for details.) > Allow @Delegate Annotation on a getter > -- > > Key: GROOVY-7769 > URL: https://issues.apache.org/jira/browse/GROOVY-7769 > Project: Groovy > Issue Type: Improvement >Reporter: Pascal Schumacher > > See [https://github.com/apache/groovy/pull/265] for details. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (GROOVY-7769) Allow @Delegate Annotation on a getter
Pascal Schumacher created GROOVY-7769: - Summary: Allow @Delegate Annotation on a getter Key: GROOVY-7769 URL: https://issues.apache.org/jira/browse/GROOVY-7769 Project: Groovy Issue Type: Improvement Reporter: Pascal Schumacher See [https://github.com/apache/groovy/pull/265| pull request] for details. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (GROOVY-7718) java.lang.ClassFormatError: Illegal class name on runtime cast array to trait
[ https://issues.apache.org/jira/browse/GROOVY-7718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15157722#comment-15157722 ] Pascal Schumacher commented on GROOVY-7718: --- Thanks for reporting the issue and thanks for letting us know that it is fixed. :) > java.lang.ClassFormatError: Illegal class name on runtime cast array to trait > - > > Key: GROOVY-7718 > URL: https://issues.apache.org/jira/browse/GROOVY-7718 > Project: Groovy > Issue Type: Bug >Affects Versions: 2.4.5 >Reporter: Pavel > Fix For: 2.4.6 > > > {code:java} > trait SimpleTrait { > } > def arr = ["one", 'two'] as String[]; > arr as SimpleTrait > {code} > Produce: > {noformat} > java.lang.ClassFormatError: Illegal class name "String;2_groovyProxy" in > class file String;2_groovyProxy > at ConsoleScript1.run(ConsoleScript1:6) > {noformat} > Possibly related to GROOVY-7650. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (GROOVY-7595) .@ continues to call setter inside closure
[ https://issues.apache.org/jira/browse/GROOVY-7595?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated GROOVY-7595: -- Fix Version/s: (was: 2.3.9) > .@ continues to call setter inside closure > -- > > Key: GROOVY-7595 > URL: https://issues.apache.org/jira/browse/GROOVY-7595 > Project: Groovy > Issue Type: Bug > Components: groovy-runtime >Affects Versions: 2.4.4, 2.4.5 > Environment: @CompileStatic >Reporter: Timothy Overly > > I have a closure that wraps updates to an object: > {code:java} > setFoo(Foo foo){ >doUpdate { > this.@foo = foo >} > } > {code} > This causes a stack overflow because it keeps recursively calling setFoo. > I have tried: > 1. making foo private/public > 2. owner.@foo > 3. delegate.@foo > Notes: > 1. This does not cause this overflow in 2.3.x > 2. The setFoo is part of an interface > 3. Class is @CompileStatic > 4. It being in a closure may/may not affect it -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (GROOVY-6301) Static inner classes not visible to child classes
[ https://issues.apache.org/jira/browse/GROOVY-6301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15157681#comment-15157681 ] Pascal Schumacher commented on GROOVY-6301: --- I created a new issue for this: [GROOVY-7762] > Static inner classes not visible to child classes > - > > Key: GROOVY-6301 > URL: https://issues.apache.org/jira/browse/GROOVY-6301 > Project: Groovy > Issue Type: Sub-task > Components: class generator >Affects Versions: 2.1.6, 2.2.0-beta-1, 2.1.7, 2.2.0 >Reporter: Kenneth Gendron > Fix For: 2.4.0-beta-3 > > > Classes that extend another class with static inner classes are unable to see > the inner classes without including the parent class name as part of the > class reference. > Example: > {code} > class X { > static class Y {} > } > class Z extends X { > Z() { > Y y = new Y(); > } > } > {code} > The compiler fails to compile "Z" saying it cannot resolve class "Y"; > however, it will accept "X.Y y = new X.Y()". > The child class should not have to reference the parent class directly to get > to its inner classes, should it? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (GROOVY-7541) GroovyBugError in TypeTransformer.addTransformer
[ https://issues.apache.org/jira/browse/GROOVY-7541?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated GROOVY-7541: -- Fix Version/s: (was: 2.3.7) > GroovyBugError in TypeTransformer.addTransformer > > > Key: GROOVY-7541 > URL: https://issues.apache.org/jira/browse/GROOVY-7541 > Project: Groovy > Issue Type: Bug > Components: groovy-runtime >Affects Versions: 2.4.4 > Environment: Java web app on either Apache on Linux or Windows, or > WebSphere on AIX. Java 7.1. Groovy via > ScriptEngineManager.getEngineByName("groovy") >Reporter: Dan Nimick > > Just updated from Groovy 2.3.6 to 2.4.4 and this code no longer works when > dynamic invocation is used (works fine when indy not used): > d1.setIndexes(new HashMap,DatasetIndex>()); > where d1 is one of the Java classes imported to the Groovy script. setIndexes > is just a plain setter of a field on the class. The error is > BUG! Unknown transformation for argument <... stuff from toString of d1 > here...> at position 0 with class com.ibm.cayce.sdv.dataset.Dataset for > parameter of type class org.codehaus.groovy.vmplugin.v7.IndyInterface > It contains no stack trace, but by searching for sources of "Unknown > transformation for argument", I found it to be in > TypeTransformer.addTransformer. If I put a breakpoint there, this is the call > stack: > TypeTransformers.addTransformer(MethodHandle, int, Object, Class) line: 124 > Selector$MethodSelector.correctCoerce() line: 793 > Selector$MethodSelector.setCallSiteTarget() line: 958 > IndyInterface.selectMethod(MutableCallSite, Class, String, int, Boolean, > Boolean, Boolean, Object, Object[]) line: 214 > Script2.run() line: 2 > GroovyScriptEngineImpl.eval(Class, ScriptContext) line: 323 > GroovyScriptEngineImpl.eval(String, ScriptContext) line: 124 > GroovyScriptEngineImpl(AbstractScriptEngine).eval(String) line: 276 > Looks like TypeTransformer was introduced via org.codehaus.groovy.vmplugin.v7 > in version 2.3.8, but I don't see anything in the 2.3.8 change log about it > (at least not under an obvious description). > FWIW, we turn on dynamic invocation via: > CompilerConfiguration configuration = new CompilerConfiguration(); > configuration.setTargetBytecode(System.getProperty("java.specification.version")); > > configuration.getOptimizationOptions().put("indy", true); > configuration.getOptimizationOptions().put("int", false); > > configuration.addCompilationCustomizers(importCustomizer,secureCustomizer); > GroovyClassLoader gcl = new > GroovyClassLoader(this.getClass().getClassLoader(), configuration); > ((GroovyScriptEngineImpl) engine).setClassLoader(gcl); > Please let me know if any more info is needed, or if there is a work around > (other than not using indy). -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Closed] (GROOVY-6301) Static inner classes not visible to child classes
[ https://issues.apache.org/jira/browse/GROOVY-6301?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher closed GROOVY-6301. - Resolution: Fixed > Static inner classes not visible to child classes > - > > Key: GROOVY-6301 > URL: https://issues.apache.org/jira/browse/GROOVY-6301 > Project: Groovy > Issue Type: Sub-task > Components: class generator >Affects Versions: 2.1.6, 2.2.0-beta-1, 2.1.7, 2.2.0 >Reporter: Kenneth Gendron > Fix For: 2.4.0-beta-3 > > > Classes that extend another class with static inner classes are unable to see > the inner classes without including the parent class name as part of the > class reference. > Example: > {code} > class X { > static class Y {} > } > class Z extends X { > Z() { > Y y = new Y(); > } > } > {code} > The compiler fails to compile "Z" saying it cannot resolve class "Y"; > however, it will accept "X.Y y = new X.Y()". > The child class should not have to reference the parent class directly to get > to its inner classes, should it? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (GROOVY-7762) Static inner classes not visible to child classes
[ https://issues.apache.org/jira/browse/GROOVY-7762?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated GROOVY-7762: -- Description: If both the parent class and the child are in the same file or project (i.e. they are being compiled together), this works; however, if the parent is compiled into a separate JAR, the child class is unable to see the parents inner classes. Example: {code}class X { static class Y {} }{code} Compile X into a separate JAR. {code}class Z extends X { Z() { Y y = new Y(); } }{code} Compiling Z will cause an error. was: Classes that extend another class with static inner classes are unable to see the inner classes without including the parent class name as part of the class reference. Example: {code} class X { static class Y {} } class Z extends X { Z() { Y y = new Y(); } } {code} The compiler fails to compile "Z" saying it cannot resolve class "Y"; however, it will accept "X.Y y = new X.Y()". The child class should not have to reference the parent class directly to get to its inner classes, should it? > Static inner classes not visible to child classes > - > > Key: GROOVY-7762 > URL: https://issues.apache.org/jira/browse/GROOVY-7762 > Project: Groovy > Issue Type: Sub-task > Components: class generator >Affects Versions: 2.1.6, 2.2.0-beta-1, 2.1.7, 2.2.0, 2.4.0-beta-3 >Reporter: Kenneth Gendron > > If both the parent class and the child are in the same file or project (i.e. > they are being compiled together), this works; however, if the parent is > compiled into a separate JAR, the child class is unable to see the parents > inner classes. > Example: > {code}class X { > static class Y {} > }{code} > Compile X into a separate JAR. > {code}class Z extends X { > Z() { > Y y = new Y(); > } > }{code} > Compiling Z will cause an error. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (GROOVY-7762) Static inner classes not visible to child classes
[ https://issues.apache.org/jira/browse/GROOVY-7762?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated GROOVY-7762: -- Fix Version/s: (was: 2.4.0-beta-3) > Static inner classes not visible to child classes > - > > Key: GROOVY-7762 > URL: https://issues.apache.org/jira/browse/GROOVY-7762 > Project: Groovy > Issue Type: Sub-task > Components: class generator >Affects Versions: 2.1.6, 2.2.0-beta-1, 2.1.7, 2.2.0, 2.4.0-beta-3 >Reporter: Kenneth Gendron > > If both the parent class and the child are in the same file or project (i.e. > they are being compiled together), this works; however, if the parent is > compiled into a separate JAR, the child class is unable to see the parents > inner classes. > Example: > {code}class X { > static class Y {} > }{code} > Compile X into a separate JAR. > {code}class Z extends X { > Z() { > Y y = new Y(); > } > }{code} > Compiling Z will cause an error. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (GROOVY-7762) Static inner classes not visible to child classes
[ https://issues.apache.org/jira/browse/GROOVY-7762?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated GROOVY-7762: -- Affects Version/s: 2.4.0-beta-3 > Static inner classes not visible to child classes > - > > Key: GROOVY-7762 > URL: https://issues.apache.org/jira/browse/GROOVY-7762 > Project: Groovy > Issue Type: Sub-task > Components: class generator >Affects Versions: 2.1.6, 2.2.0-beta-1, 2.1.7, 2.2.0, 2.4.0-beta-3 >Reporter: Kenneth Gendron > > If both the parent class and the child are in the same file or project (i.e. > they are being compiled together), this works; however, if the parent is > compiled into a separate JAR, the child class is unable to see the parents > inner classes. > Example: > {code}class X { > static class Y {} > }{code} > Compile X into a separate JAR. > {code}class Z extends X { > Z() { > Y y = new Y(); > } > }{code} > Compiling Z will cause an error. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (GROOVY-7762) Static inner classes not visible to child classes
Pascal Schumacher created GROOVY-7762: - Summary: Static inner classes not visible to child classes Key: GROOVY-7762 URL: https://issues.apache.org/jira/browse/GROOVY-7762 Project: Groovy Issue Type: Sub-task Components: class generator Affects Versions: 2.1.6, 2.2.0-beta-1, 2.1.7, 2.2.0 Reporter: Kenneth Gendron Fix For: 2.4.0-beta-3 Classes that extend another class with static inner classes are unable to see the inner classes without including the parent class name as part of the class reference. Example: {code} class X { static class Y {} } class Z extends X { Z() { Y y = new Y(); } } {code} The compiler fails to compile "Z" saying it cannot resolve class "Y"; however, it will accept "X.Y y = new X.Y()". The child class should not have to reference the parent class directly to get to its inner classes, should it? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (GROOVY-7755) Add Extension Methods for JAXB Marshalling and Unmarschalling Suppport
[ https://issues.apache.org/jira/browse/GROOVY-7755?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated GROOVY-7755: -- Summary: Add Extension Methods for JAXB Marshalling and Unmarschalling Suppport (was: Add Category for JAXB Marshalling and Unmarschalling Suppport) > Add Extension Methods for JAXB Marshalling and Unmarschalling Suppport > -- > > Key: GROOVY-7755 > URL: https://issues.apache.org/jira/browse/GROOVY-7755 > Project: Groovy > Issue Type: New Feature >Reporter: Pascal Schumacher > > see pull request: https://github.com/apache/groovy/pull/255 for details -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (GROOVY-7291) Declaration of double variable without value assignment referrenced in closure
[ https://issues.apache.org/jira/browse/GROOVY-7291?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated GROOVY-7291: -- Fix Version/s: (was: 2.4.7) (was: 2.5.0-beta-1) > Declaration of double variable without value assignment referrenced in closure > -- > > Key: GROOVY-7291 > URL: https://issues.apache.org/jira/browse/GROOVY-7291 > Project: Groovy > Issue Type: Bug >Affects Versions: 1.8.6, 2.2.1, 2.4.0 > Environment: Windows 8.1, JDK 1.7_71 and 1.8_25 >Reporter: David Richter >Priority: Critical > Attachments: groovyBug.zip > > > I have problem with following code: > double a; > def b = { >a = a + 1; > } > b(); > I tried to compile it with groovy 1.8.6 and it worked > variable 'a' was instantiated with value 0.0 > but after upgrade to groovy 2.2.1 > it throws NullPointerException because variable 'a' is instantiated to null > I tried to decompile class files and declaration of 'a' looked like this: > version 1.8.6 > CallSite[] var1 = $getCallSiteArray(); > final Reference a = new > Reference((Double)DefaultTypeTransformation.box(0.0D)); > DefaultTypeTransformation.doubleUnbox(a.get()); > ... > version 2.2.1 > CallSite[] var1 = $getCallSiteArray(); > final Reference a = new Reference((Object)null); > Double var1 = (Double)a.get(); > ... > I tried it also with version 2.4.0 but it has same result as 2.2.1 > In attachment are groovy classes, compiled classes and consoleOutputs for > versions 1.8.6 and 2.2.1 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (GROOVY-7755) Add Category for JAXB Marshalling and Unmarschalling Suppport
[ https://issues.apache.org/jira/browse/GROOVY-7755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15155952#comment-15155952 ] Pascal Schumacher commented on GROOVY-7755: --- Best ask the author of the pull request, at [https://github.com/apache/groovy/pull/255] > Add Category for JAXB Marshalling and Unmarschalling Suppport > - > > Key: GROOVY-7755 > URL: https://issues.apache.org/jira/browse/GROOVY-7755 > Project: Groovy > Issue Type: New Feature >Reporter: Pascal Schumacher > > see pull request: https://github.com/apache/groovy/pull/255 for details -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (GROOVY-7753) regression of return type from ?: operator
[ https://issues.apache.org/jira/browse/GROOVY-7753?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated GROOVY-7753: -- Summary: regression of return type from ?: operator (was: 2.4.6-SNAPSHOT regression of return type from ?: operator) > regression of return type from ?: operator > -- > > Key: GROOVY-7753 > URL: https://issues.apache.org/jira/browse/GROOVY-7753 > Project: Groovy > Issue Type: Bug > Components: Static compilation, Static Type Checker >Affects Versions: 2.4.6 >Reporter: Jason Winnebeck > > In Groovy 2.4.5 the following code works, but in Groovy 2.4.6, it fails to > compile: > {code} > @groovy.transform.Field > String x = "X" > @groovy.transform.CompileStatic > public List getStrings() { > x ? [x] : Collections.emptyList() > } > getStrings() > {code} > In Groovy 2.4.6 the compile error is: > {code} > [Static type checking] - Incompatible generic argument types. Cannot assign > java.util.List to: java.util.List > @ line 6, column 2. > x ? [x] : Collections.emptyList() > ^ > {code} > Workaround is to cast the result of emptyList to the erased type, (List) in > this case. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Resolved] (GROOVY-7621) Memory Leak (metaClassRegistry) unable to remove metaClass based on instances
[ https://issues.apache.org/jira/browse/GROOVY-7621?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher resolved GROOVY-7621. --- Resolution: Fixed Assignee: John Wagenleitner [~kimbonics] I'm resolving this issue. Please reopen if it's not completely fixed. Thanks! > Memory Leak (metaClassRegistry) unable to remove metaClass based on instances > - > > Key: GROOVY-7621 > URL: https://issues.apache.org/jira/browse/GROOVY-7621 > Project: Groovy > Issue Type: Bug > Components: groovy-runtime >Affects Versions: 2.3.7 > Environment: Running from Eclipse, JBoss with jdk 1.6 >Reporter: Kimball C Sampson >Assignee: John Wagenleitner > Fix For: 2.4.6 > > > I'm using the GroovyScriptEngine in a web server environment where the > scripts are provided properties on-the-fly from database objects. This is > done by implementing script.metaClass.propertyMissing. When I return a > value, I set the metaClass to give the returned value even more > sub-properties. After processing 100k records or so, I run out of memory. I > tried to write code to remove entries from the metaClassRepository, but > there's no way to do it for an object instanced based metaClass. Also, I've > outputed the GroovySystem.metaClassRepository.iterator().size() and it kept > growing. The values are out of scope so they should get garbage collected, > but the metaClasses aren't getting cleaned up. > The workaround to this problem was to implement a groovy Proxy, though, I > liked the metaClass solution better. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Closed] (GROOVY-7757) Malformed class names for closures in inner classes
[ https://issues.apache.org/jira/browse/GROOVY-7757?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher closed GROOVY-7757. - Resolution: Invalid > Malformed class names for closures in inner classes > --- > > Key: GROOVY-7757 > URL: https://issues.apache.org/jira/browse/GROOVY-7757 > Project: Groovy > Issue Type: Sub-task > Components: class generator >Affects Versions: 2.4.5 >Reporter: Sam Corbett > > The class names generated for closures in inner classes break > Class.getSimpleName() > For example, the closure passed to .each in this example has name > Example$_Inner_closure1.class: > {code} > public class Example { > private class Inner { > def _ = [1, 2, 3].each {} > } > } > {code} > Calling getSimpleName() on this class (e.g. as done by > [Weld|http://seamframework.org/Weld] on startup) throws a > java.lang.InternalError: > {code} > Caused by: java.lang.InternalError: Malformed class name > at java.lang.Class.getSimpleName(Class.java:1133) [:1.6.0_29] > at java.lang.Class.isAnonymousClass(Class.java:1188) [:1.6.0_29] > {code} > I believe the class name is expected to be in the format > Example$Inner$closure1. > I've attached a test case to demonstrate the problem - extract the archive, > cd to groovy-closure-classname-test and run mvn test. The test uses Weld to > inject a ClosureClassNameTest instance, but fails when Weld calls > getSimpleName() on the class for the closure on line 10. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (GROOVY-7753) 2.4.6-SNAPSHOT regression of return type from ?: operator
[ https://issues.apache.org/jira/browse/GROOVY-7753?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15149217#comment-15149217 ] Pascal Schumacher commented on GROOVY-7753: --- Hi John, it was my fault. I somehow confused [GROOVY-7598] with [GROOVY-7742]. :( Sorry. > 2.4.6-SNAPSHOT regression of return type from ?: operator > - > > Key: GROOVY-7753 > URL: https://issues.apache.org/jira/browse/GROOVY-7753 > Project: Groovy > Issue Type: Bug > Components: Static compilation, Static Type Checker >Affects Versions: 2.4.6 >Reporter: Jason Winnebeck > > In Groovy 2.4.5 the following code works, but in Groovy 2.4.6, it fails to > compile: > {code} > @groovy.transform.Field > String x = "X" > @groovy.transform.CompileStatic > public List getStrings() { > x ? [x] : Collections.emptyList() > } > getStrings() > {code} > In Groovy 2.4.6 the compile error is: > {code} > [Static type checking] - Incompatible generic argument types. Cannot assign > java.util.List to: java.util.List > @ line 6, column 2. > x ? [x] : Collections.emptyList() > ^ > {code} > Workaround is to cast the result of emptyList to the erased type, (List) in > this case. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (GROOVY-7753) 2.4.6-SNAPSHOT regression of return type from ?: operator
[ https://issues.apache.org/jira/browse/GROOVY-7753?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15149107#comment-15149107 ] Pascal Schumacher commented on GROOVY-7753: --- [~jwagenleitner] I think it is not related to [GROOVY-7598], because [GROOVY-7598] is fixed in current master (at least the test from your pull request passes), but this still fails. > 2.4.6-SNAPSHOT regression of return type from ?: operator > - > > Key: GROOVY-7753 > URL: https://issues.apache.org/jira/browse/GROOVY-7753 > Project: Groovy > Issue Type: Bug > Components: Static compilation, Static Type Checker >Affects Versions: 2.4.6 >Reporter: Jason Winnebeck > > In Groovy 2.4.5 the following code works, but in Groovy 2.4.6, it fails to > compile: > {code} > @groovy.transform.Field > String x = "X" > @groovy.transform.CompileStatic > public List getStrings() { > x ? [x] : Collections.emptyList() > } > getStrings() > {code} > In Groovy 2.4.6 the compile error is: > {code} > [Static type checking] - Incompatible generic argument types. Cannot assign > java.util.List to: java.util.List > @ line 6, column 2. > x ? [x] : Collections.emptyList() > ^ > {code} > Workaround is to cast the result of emptyList to the erased type, (List) in > this case. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (GROOVY-5351) Malformed class names for closures in inner classes
[ https://issues.apache.org/jira/browse/GROOVY-5351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15149047#comment-15149047 ] Pascal Schumacher commented on GROOVY-5351: --- Thanks for reporting. I cloned the issue and reopened it as GROOVY-7757 > Malformed class names for closures in inner classes > --- > > Key: GROOVY-5351 > URL: https://issues.apache.org/jira/browse/GROOVY-5351 > Project: Groovy > Issue Type: Sub-task > Components: class generator >Affects Versions: 1.8.4, 1.8.6 > Environment: OS X, Groovy 1.8.4, Java version 1.6.0_29 >Reporter: Sam Corbett >Assignee: Jochen Theodorou > Labels: breaking > Fix For: 2.4.0-beta-4 > > Attachments: FileCipher.groovy, closure-classname.tar.gz > > > The class names generated for closures in inner classes break > Class.getSimpleName() > For example, the closure passed to .each in this example has name > Example$_Inner_closure1.class: > {code} > public class Example { > private class Inner { > def _ = [1, 2, 3].each {} > } > } > {code} > Calling getSimpleName() on this class (e.g. as done by > [Weld|http://seamframework.org/Weld] on startup) throws a > java.lang.InternalError: > {code} > Caused by: java.lang.InternalError: Malformed class name > at java.lang.Class.getSimpleName(Class.java:1133) [:1.6.0_29] > at java.lang.Class.isAnonymousClass(Class.java:1188) [:1.6.0_29] > {code} > I believe the class name is expected to be in the format > Example$Inner$closure1. > I've attached a test case to demonstrate the problem - extract the archive, > cd to groovy-closure-classname-test and run mvn test. The test uses Weld to > inject a ClosureClassNameTest instance, but fails when Weld calls > getSimpleName() on the class for the closure on line 10. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (GROOVY-7757) Malformed class names for closures in inner classes
[ https://issues.apache.org/jira/browse/GROOVY-7757?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated GROOVY-7757: -- Labels: (was: breaking) > Malformed class names for closures in inner classes > --- > > Key: GROOVY-7757 > URL: https://issues.apache.org/jira/browse/GROOVY-7757 > Project: Groovy > Issue Type: Sub-task > Components: class generator >Affects Versions: 2.4.5 > Environment: OS X, Groovy 1.8.4, Java version 1.6.0_29 >Reporter: Sam Corbett >Assignee: Jochen Theodorou > > The class names generated for closures in inner classes break > Class.getSimpleName() > For example, the closure passed to .each in this example has name > Example$_Inner_closure1.class: > {code} > public class Example { > private class Inner { > def _ = [1, 2, 3].each {} > } > } > {code} > Calling getSimpleName() on this class (e.g. as done by > [Weld|http://seamframework.org/Weld] on startup) throws a > java.lang.InternalError: > {code} > Caused by: java.lang.InternalError: Malformed class name > at java.lang.Class.getSimpleName(Class.java:1133) [:1.6.0_29] > at java.lang.Class.isAnonymousClass(Class.java:1188) [:1.6.0_29] > {code} > I believe the class name is expected to be in the format > Example$Inner$closure1. > I've attached a test case to demonstrate the problem - extract the archive, > cd to groovy-closure-classname-test and run mvn test. The test uses Weld to > inject a ClosureClassNameTest instance, but fails when Weld calls > getSimpleName() on the class for the closure on line 10. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Assigned] (GROOVY-7757) Malformed class names for closures in inner classes
[ https://issues.apache.org/jira/browse/GROOVY-7757?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher reassigned GROOVY-7757: - Assignee: (was: Jochen Theodorou) > Malformed class names for closures in inner classes > --- > > Key: GROOVY-7757 > URL: https://issues.apache.org/jira/browse/GROOVY-7757 > Project: Groovy > Issue Type: Sub-task > Components: class generator >Affects Versions: 2.4.5 >Reporter: Sam Corbett > > The class names generated for closures in inner classes break > Class.getSimpleName() > For example, the closure passed to .each in this example has name > Example$_Inner_closure1.class: > {code} > public class Example { > private class Inner { > def _ = [1, 2, 3].each {} > } > } > {code} > Calling getSimpleName() on this class (e.g. as done by > [Weld|http://seamframework.org/Weld] on startup) throws a > java.lang.InternalError: > {code} > Caused by: java.lang.InternalError: Malformed class name > at java.lang.Class.getSimpleName(Class.java:1133) [:1.6.0_29] > at java.lang.Class.isAnonymousClass(Class.java:1188) [:1.6.0_29] > {code} > I believe the class name is expected to be in the format > Example$Inner$closure1. > I've attached a test case to demonstrate the problem - extract the archive, > cd to groovy-closure-classname-test and run mvn test. The test uses Weld to > inject a ClosureClassNameTest instance, but fails when Weld calls > getSimpleName() on the class for the closure on line 10. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (GROOVY-7757) Malformed class names for closures in inner classes
[ https://issues.apache.org/jira/browse/GROOVY-7757?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated GROOVY-7757: -- Affects Version/s: (was: 1.8.6) (was: 1.8.4) 2.4.5 > Malformed class names for closures in inner classes > --- > > Key: GROOVY-7757 > URL: https://issues.apache.org/jira/browse/GROOVY-7757 > Project: Groovy > Issue Type: Sub-task > Components: class generator >Affects Versions: 2.4.5 > Environment: OS X, Groovy 1.8.4, Java version 1.6.0_29 >Reporter: Sam Corbett >Assignee: Jochen Theodorou > > The class names generated for closures in inner classes break > Class.getSimpleName() > For example, the closure passed to .each in this example has name > Example$_Inner_closure1.class: > {code} > public class Example { > private class Inner { > def _ = [1, 2, 3].each {} > } > } > {code} > Calling getSimpleName() on this class (e.g. as done by > [Weld|http://seamframework.org/Weld] on startup) throws a > java.lang.InternalError: > {code} > Caused by: java.lang.InternalError: Malformed class name > at java.lang.Class.getSimpleName(Class.java:1133) [:1.6.0_29] > at java.lang.Class.isAnonymousClass(Class.java:1188) [:1.6.0_29] > {code} > I believe the class name is expected to be in the format > Example$Inner$closure1. > I've attached a test case to demonstrate the problem - extract the archive, > cd to groovy-closure-classname-test and run mvn test. The test uses Weld to > inject a ClosureClassNameTest instance, but fails when Weld calls > getSimpleName() on the class for the closure on line 10. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (GROOVY-7757) Malformed class names for closures in inner classes
[ https://issues.apache.org/jira/browse/GROOVY-7757?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher updated GROOVY-7757: -- Environment: (was: OS X, Groovy 1.8.4, Java version 1.6.0_29) > Malformed class names for closures in inner classes > --- > > Key: GROOVY-7757 > URL: https://issues.apache.org/jira/browse/GROOVY-7757 > Project: Groovy > Issue Type: Sub-task > Components: class generator >Affects Versions: 2.4.5 >Reporter: Sam Corbett >Assignee: Jochen Theodorou > > The class names generated for closures in inner classes break > Class.getSimpleName() > For example, the closure passed to .each in this example has name > Example$_Inner_closure1.class: > {code} > public class Example { > private class Inner { > def _ = [1, 2, 3].each {} > } > } > {code} > Calling getSimpleName() on this class (e.g. as done by > [Weld|http://seamframework.org/Weld] on startup) throws a > java.lang.InternalError: > {code} > Caused by: java.lang.InternalError: Malformed class name > at java.lang.Class.getSimpleName(Class.java:1133) [:1.6.0_29] > at java.lang.Class.isAnonymousClass(Class.java:1188) [:1.6.0_29] > {code} > I believe the class name is expected to be in the format > Example$Inner$closure1. > I've attached a test case to demonstrate the problem - extract the archive, > cd to groovy-closure-classname-test and run mvn test. The test uses Weld to > inject a ClosureClassNameTest instance, but fails when Weld calls > getSimpleName() on the class for the closure on line 10. -- This message was sent by Atlassian JIRA (v6.3.4#6332)