[jira] [Resolved] (GROOVY-7728) LAX parser: Commenting out key/val pairs doesn't work
[ https://issues.apache.org/jira/browse/GROOVY-7728?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] John Wagenleitner resolved GROOVY-7728. --- Resolution: Fixed Assignee: John Wagenleitner Fix Version/s: 2.4.7 Thanks for reporting the issue. > LAX parser: Commenting out key/val pairs doesn't work > -- > > Key: GROOVY-7728 > URL: https://issues.apache.org/jira/browse/GROOVY-7728 > Project: Groovy > Issue Type: Bug > Components: JSON >Affects Versions: 2.4.5 > Environment: Linux OpenJDK 7 (java version "1.7.0_91") >Reporter: Stephen Olander-Waters >Assignee: John Wagenleitner >Priority: Minor > Fix For: 2.4.7 > > > This is in regards to {{JsonParserType.LAX}}. I'm calling it with this code: > {code} > def slurpOpts = new JsonSlurper().setType(JsonParserType.LAX).parse(new > File(ConfigFileName)) > slurpOpts.each {k, v -> myOpts.put(k, slurpOpts.get(k))} > {code} > Here is my JSON. {{appUserId}} is parsed but it should be commented out. The > key {{baseFolderName}} is correctly commented out. > {code} > { > "enterpriseDomain": "@example.com" > ,"enterpriseId": "123456" > ,"clientId": "abcdefghijklmnopqrstuvwxyz123456" > ,"clientSecret": "abcdefghijklmnopqrstuvwxyz123456" > ,"keyId": "12345678" > ,"keyFileName": "/etc/PrintToBox/PrintToBox_private_key.pem" > ,"keyPassword": "12345678901234567890" > // ,"appUserId": "123456789" > // Optional parameters with defaults shown > // ,"baseFolderName": "PrintToBox" > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (GROOVY-7728) LAX parser: Commenting out key/val pairs doesn't work
[ https://issues.apache.org/jira/browse/GROOVY-7728?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15263430#comment-15263430 ] ASF GitHub Bot commented on GROOVY-7728: Github user asfgit closed the pull request at: https://github.com/apache/groovy/pull/322 > LAX parser: Commenting out key/val pairs doesn't work > -- > > Key: GROOVY-7728 > URL: https://issues.apache.org/jira/browse/GROOVY-7728 > Project: Groovy > Issue Type: Bug > Components: JSON >Affects Versions: 2.4.5 > Environment: Linux OpenJDK 7 (java version "1.7.0_91") >Reporter: Stephen Olander-Waters >Priority: Minor > > This is in regards to {{JsonParserType.LAX}}. I'm calling it with this code: > {code} > def slurpOpts = new JsonSlurper().setType(JsonParserType.LAX).parse(new > File(ConfigFileName)) > slurpOpts.each {k, v -> myOpts.put(k, slurpOpts.get(k))} > {code} > Here is my JSON. {{appUserId}} is parsed but it should be commented out. The > key {{baseFolderName}} is correctly commented out. > {code} > { > "enterpriseDomain": "@example.com" > ,"enterpriseId": "123456" > ,"clientId": "abcdefghijklmnopqrstuvwxyz123456" > ,"clientSecret": "abcdefghijklmnopqrstuvwxyz123456" > ,"keyId": "12345678" > ,"keyFileName": "/etc/PrintToBox/PrintToBox_private_key.pem" > ,"keyPassword": "12345678901234567890" > // ,"appUserId": "123456789" > // Optional parameters with defaults shown > // ,"baseFolderName": "PrintToBox" > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[GitHub] groovy pull request: GROOVY-7728 - LAX parser: Commenting out key/...
Github user asfgit closed the pull request at: https://github.com/apache/groovy/pull/322 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[jira] [Commented] (GROOVY-6547) metaClass property changes
[ https://issues.apache.org/jira/browse/GROOVY-6547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15262531#comment-15262531 ] John Wagenleitner commented on GROOVY-6547: --- The following commit added a check in order to exclude {{GeneratedMetaMethod}}'s which {{metaClass}} is: https://github.com/apache/groovy/commit/30d8e55304052bf501cb3f8a5a83fd56428ace89#diff-c1354c0d7df171ad8cafcb3d1bf63857 > metaClass property changes > -- > > Key: GROOVY-6547 > URL: https://issues.apache.org/jira/browse/GROOVY-6547 > Project: Groovy > Issue Type: Bug > Environment: Using Fedora Linux 19 - OpenJDK 1.7.0 >Reporter: James Gardiner > > The metaClass property is not exposed for classes a la Groovy In Action > Listing 7.21. This formerly worked in 1.8.9. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Closed] (GROOVY-7829) the split method on string produces an unexpected data type "[Ljava.lang.String;"
[ https://issues.apache.org/jira/browse/GROOVY-7829?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andrew Bowman closed GROOVY-7829. - Resolution: Not A Problem > the split method on string produces an unexpected data type > "[Ljava.lang.String;" > - > > Key: GROOVY-7829 > URL: https://issues.apache.org/jira/browse/GROOVY-7829 > Project: Groovy > Issue Type: Bug > Components: groovy-runtime >Affects Versions: 2.4.5 > Environment: JVM: 1.8.0_20 >Reporter: Andrew Bowman >Priority: Minor > > {code} > def x = '123' > def no = x.split('') > def yes = x.collect{it} > assert yes == ['1','2','3'] > assert no == ['1','2','3'] > assert yes == no > println yes.getClass() > println no.getClass() > println yes.remove('1') > println no.remove('1') > class java.util.ArrayList > class [Ljava.lang.String; > true > Exception thrown > groovy.lang.MissingMethodException: No signature of method: > [Ljava.lang.String;.remove() is applicable for argument types: > (java.lang.String) values: [1] > Possible solutions: reverse(), reverse(boolean), join(java.lang.String), > getAt(java.lang.String) > at > org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:58) > at > org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:49) > 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 ConsoleScript118.run(ConsoleScript118:71) > at > groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:263) > at groovy.lang.GroovyShell.run(GroovyShell.java:524) > at groovy.lang.GroovyShell.run(GroovyShell.java:503) > at groovy.lang.GroovyShell.run(GroovyShell.java:170) > at groovy.lang.GroovyShell$run$1.call(Unknown Source) > at groovy.ui.Console$_runScriptImpl_closure17.doCall(Console.groovy:989) > at groovy.ui.Console$_runScriptImpl_closure17.doCall(Console.groovy) > at sun.reflect.GeneratedMethodAccessor746.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:483) > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (GROOVY-7829) the split method on string produces an unexpected data type "[Ljava.lang.String;"
[ https://issues.apache.org/jira/browse/GROOVY-7829?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15262398#comment-15262398 ] Andrew Bowman commented on GROOVY-7829: --- Ah. I see that now. Apologies for the wasted time. Thank you, John. > the split method on string produces an unexpected data type > "[Ljava.lang.String;" > - > > Key: GROOVY-7829 > URL: https://issues.apache.org/jira/browse/GROOVY-7829 > Project: Groovy > Issue Type: Bug > Components: groovy-runtime >Affects Versions: 2.4.5 > Environment: JVM: 1.8.0_20 >Reporter: Andrew Bowman >Priority: Minor > > {code} > def x = '123' > def no = x.split('') > def yes = x.collect{it} > assert yes == ['1','2','3'] > assert no == ['1','2','3'] > assert yes == no > println yes.getClass() > println no.getClass() > println yes.remove('1') > println no.remove('1') > class java.util.ArrayList > class [Ljava.lang.String; > true > Exception thrown > groovy.lang.MissingMethodException: No signature of method: > [Ljava.lang.String;.remove() is applicable for argument types: > (java.lang.String) values: [1] > Possible solutions: reverse(), reverse(boolean), join(java.lang.String), > getAt(java.lang.String) > at > org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:58) > at > org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:49) > 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 ConsoleScript118.run(ConsoleScript118:71) > at > groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:263) > at groovy.lang.GroovyShell.run(GroovyShell.java:524) > at groovy.lang.GroovyShell.run(GroovyShell.java:503) > at groovy.lang.GroovyShell.run(GroovyShell.java:170) > at groovy.lang.GroovyShell$run$1.call(Unknown Source) > at groovy.ui.Console$_runScriptImpl_closure17.doCall(Console.groovy:989) > at groovy.ui.Console$_runScriptImpl_closure17.doCall(Console.groovy) > at sun.reflect.GeneratedMethodAccessor746.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:483) > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (GROOVY-7829) the split method on string produces an unexpected data type "[Ljava.lang.String;"
[ https://issues.apache.org/jira/browse/GROOVY-7829?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] John Wagenleitner updated GROOVY-7829: -- Description: {code} def x = '123' def no = x.split('') def yes = x.collect{it} assert yes == ['1','2','3'] assert no == ['1','2','3'] assert yes == no println yes.getClass() println no.getClass() println yes.remove('1') println no.remove('1') class java.util.ArrayList class [Ljava.lang.String; true Exception thrown groovy.lang.MissingMethodException: No signature of method: [Ljava.lang.String;.remove() is applicable for argument types: (java.lang.String) values: [1] Possible solutions: reverse(), reverse(boolean), join(java.lang.String), getAt(java.lang.String) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:58) at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:49) 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 ConsoleScript118.run(ConsoleScript118:71) at groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:263) at groovy.lang.GroovyShell.run(GroovyShell.java:524) at groovy.lang.GroovyShell.run(GroovyShell.java:503) at groovy.lang.GroovyShell.run(GroovyShell.java:170) at groovy.lang.GroovyShell$run$1.call(Unknown Source) at groovy.ui.Console$_runScriptImpl_closure17.doCall(Console.groovy:989) at groovy.ui.Console$_runScriptImpl_closure17.doCall(Console.groovy) at sun.reflect.GeneratedMethodAccessor746.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) {code} was: def x = '123' def no = x.split('') def yes = x.collect{it} assert yes == ['1','2','3'] assert no == ['1','2','3'] assert yes == no println yes.getClass() println no.getClass() println yes.remove('1') println no.remove('1') class java.util.ArrayList class [Ljava.lang.String; true Exception thrown groovy.lang.MissingMethodException: No signature of method: [Ljava.lang.String;.remove() is applicable for argument types: (java.lang.String) values: [1] Possible solutions: reverse(), reverse(boolean), join(java.lang.String), getAt(java.lang.String) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:58) at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:49) 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 ConsoleScript118.run(ConsoleScript118:71) at groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:263) at groovy.lang.GroovyShell.run(GroovyShell.java:524) at groovy.lang.GroovyShell.run(GroovyShell.java:503) at groovy.lang.GroovyShell.run(GroovyShell.java:170) at groovy.lang.GroovyShell$run$1.call(Unknown Source) at groovy.ui.Console$_runScriptImpl_closure17.doCall(Console.groovy:989) at groovy.ui.Console$_runScriptImpl_closure17.doCall(Console.groovy) at sun.reflect.GeneratedMethodAccessor746.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) > the split method on string produces an unexpected data type > "[Ljava.lang.String;" > - > > Key: GROOVY-7829 > URL: https://issues.apache.org/jira/browse/GROOVY-7829 > Project: Groovy > Issue Type: Bug > Components: groovy-runtime >Affects Versions: 2.4.5 > Environment: JVM: 1.8.0_20 >Reporter: Andrew Bowman >Priority: Minor > > {code} > def x = '123' > def no = x.split('') > def yes = x.collect{it} > assert yes == ['1','2','3'] > assert no == ['1','2','3'] > assert yes == no > println yes.getClass() > println no.getClass() > println yes.remove('1') > println no.remove('1') > class java.util.ArrayList > class [Ljava.lang.String; > true > Exception thrown > groovy.lang.MissingMethodException: No signature of method: > [Ljava.lang.String;.remove() is applicable for argument types: > (java.lang.String) values: [1] > Possible solutions: reverse(), reverse(boolean), join(java.lang.String), >
[jira] [Commented] (GROOVY-7829) the split method on string produces an unexpected data type "[Ljava.lang.String;"
[ https://issues.apache.org/jira/browse/GROOVY-7829?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15262370#comment-15262370 ] John Wagenleitner commented on GROOVY-7829: --- The split methods defined in the {{String}} class and those added to {{CharSequence}} by Groovy are all defined to return {{String[]}}. In the sample code above it should be calling the following method on String. https://docs.oracle.com/javase/8/docs/api/java/lang/String.html#split-java.lang.String- You could convert it to a List by {code} def no = x.split('') as List {code} > the split method on string produces an unexpected data type > "[Ljava.lang.String;" > - > > Key: GROOVY-7829 > URL: https://issues.apache.org/jira/browse/GROOVY-7829 > Project: Groovy > Issue Type: Bug > Components: groovy-runtime >Affects Versions: 2.4.5 > Environment: JVM: 1.8.0_20 >Reporter: Andrew Bowman >Priority: Minor > > def x = '123' > def no = x.split('') > def yes = x.collect{it} > assert yes == ['1','2','3'] > assert no == ['1','2','3'] > assert yes == no > println yes.getClass() > println no.getClass() > println yes.remove('1') > println no.remove('1') > class java.util.ArrayList > class [Ljava.lang.String; > true > Exception thrown > groovy.lang.MissingMethodException: No signature of method: > [Ljava.lang.String;.remove() is applicable for argument types: > (java.lang.String) values: [1] > Possible solutions: reverse(), reverse(boolean), join(java.lang.String), > getAt(java.lang.String) > at > org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:58) > at > org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:49) > 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 ConsoleScript118.run(ConsoleScript118:71) > at > groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:263) > at groovy.lang.GroovyShell.run(GroovyShell.java:524) > at groovy.lang.GroovyShell.run(GroovyShell.java:503) > at groovy.lang.GroovyShell.run(GroovyShell.java:170) > at groovy.lang.GroovyShell$run$1.call(Unknown Source) > at groovy.ui.Console$_runScriptImpl_closure17.doCall(Console.groovy:989) > at groovy.ui.Console$_runScriptImpl_closure17.doCall(Console.groovy) > at sun.reflect.GeneratedMethodAccessor746.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:483) -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (GROOVY-7829) the split method on string produces an unexpected data type "[Ljava.lang.String;"
[ https://issues.apache.org/jira/browse/GROOVY-7829?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andrew Bowman updated GROOVY-7829: -- Summary: the split method on string produces an unexpected data type "[Ljava.lang.String;" (was: the split method on string produces an unexpected data type "Ljava.lang.String;") > the split method on string produces an unexpected data type > "[Ljava.lang.String;" > - > > Key: GROOVY-7829 > URL: https://issues.apache.org/jira/browse/GROOVY-7829 > Project: Groovy > Issue Type: Bug > Components: groovy-runtime >Affects Versions: 2.4.5 > Environment: JVM: 1.8.0_20 >Reporter: Andrew Bowman >Priority: Minor > > def x = '123' > def no = x.split('') > def yes = x.collect{it} > assert yes == ['1','2','3'] > assert no == ['1','2','3'] > assert yes == no > println yes.getClass() > println no.getClass() > println yes.remove('1') > println no.remove('1') > class java.util.ArrayList > class [Ljava.lang.String; > true > Exception thrown > groovy.lang.MissingMethodException: No signature of method: > [Ljava.lang.String;.remove() is applicable for argument types: > (java.lang.String) values: [1] > Possible solutions: reverse(), reverse(boolean), join(java.lang.String), > getAt(java.lang.String) > at > org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:58) > at > org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:49) > 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 ConsoleScript118.run(ConsoleScript118:71) > at > groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:263) > at groovy.lang.GroovyShell.run(GroovyShell.java:524) > at groovy.lang.GroovyShell.run(GroovyShell.java:503) > at groovy.lang.GroovyShell.run(GroovyShell.java:170) > at groovy.lang.GroovyShell$run$1.call(Unknown Source) > at groovy.ui.Console$_runScriptImpl_closure17.doCall(Console.groovy:989) > at groovy.ui.Console$_runScriptImpl_closure17.doCall(Console.groovy) > at sun.reflect.GeneratedMethodAccessor746.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:483) -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (GROOVY-7829) the split method on string produces an unexpected data type "Ljava.lang.String;"
Andrew Bowman created GROOVY-7829: - Summary: the split method on string produces an unexpected data type "Ljava.lang.String;" Key: GROOVY-7829 URL: https://issues.apache.org/jira/browse/GROOVY-7829 Project: Groovy Issue Type: Bug Components: groovy-runtime Affects Versions: 2.4.5 Environment: JVM: 1.8.0_20 Reporter: Andrew Bowman Priority: Minor def x = '123' def no = x.split('') def yes = x.collect{it} assert yes == ['1','2','3'] assert no == ['1','2','3'] assert yes == no println yes.getClass() println no.getClass() println yes.remove('1') println no.remove('1') class java.util.ArrayList class [Ljava.lang.String; true Exception thrown groovy.lang.MissingMethodException: No signature of method: [Ljava.lang.String;.remove() is applicable for argument types: (java.lang.String) values: [1] Possible solutions: reverse(), reverse(boolean), join(java.lang.String), getAt(java.lang.String) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:58) at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:49) 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 ConsoleScript118.run(ConsoleScript118:71) at groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:263) at groovy.lang.GroovyShell.run(GroovyShell.java:524) at groovy.lang.GroovyShell.run(GroovyShell.java:503) at groovy.lang.GroovyShell.run(GroovyShell.java:170) at groovy.lang.GroovyShell$run$1.call(Unknown Source) at groovy.ui.Console$_runScriptImpl_closure17.doCall(Console.groovy:989) at groovy.ui.Console$_runScriptImpl_closure17.doCall(Console.groovy) at sun.reflect.GeneratedMethodAccessor746.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (GROOVY-7646) Classes generated by Eval() never collected from Permgen/Metaspace
[ https://issues.apache.org/jira/browse/GROOVY-7646?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15261805#comment-15261805 ] Alexander Petrossian (PAF) commented on GROOVY-7646: Colleagues, I would suggest to cache internally class, generated by Eval, using eval expression String as a key. This will still not garbage-collect, and given random input to Eval also lead to OOM. Yet real-life scenarios are usually closer to that in Description, meaning -- little different expressions. This will be WAY better than current situation, when we just CAN NOT use Eval in long-running apps. > Classes generated by Eval() never collected from Permgen/Metaspace > -- > > Key: GROOVY-7646 > URL: https://issues.apache.org/jira/browse/GROOVY-7646 > Project: Groovy > Issue Type: Bug > Components: groovy-runtime >Affects Versions: 2.4.5 > Environment: Oracle jdk8u51 and jdk8u66 >Reporter: Isaac Dooley > > It seems classes generated by Eval() are never collected, thus causing > PermGen or Metaspace to fill up and the JVM to hang/crash. > Reproduce by running the following code, after setting java option > {{-XX:MaxMetaspaceSize=50m}}. > {code} > 10.times{ x -> assert 10 == Eval.x(2, 'x * 4 + 2;') } > {code} > After about 2700 calls to Eval the program will crash with OutOfMemoryError, -- This message was sent by Atlassian JIRA (v6.3.4#6332)