[jira] [Updated] (GROOVY-8875) NullObject.metaClass
[ https://issues.apache.org/jira/browse/GROOVY-8875?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Paul King updated GROOVY-8875: -- Fix Version/s: (was: 3.x) > NullObject.metaClass > > > Key: GROOVY-8875 > URL: https://issues.apache.org/jira/browse/GROOVY-8875 > Project: Groovy > Issue Type: Bug >Reporter: Pruteanu Dragos >Priority: Major > > Hi, > I execute this. The third shell.evaluate throws an exception: > {code} > final GroovyShell shell = new GroovyShell( binding, > FormsGroovyConfiguration.CONFIG ); > // THIS WILL FORCE NULL VARIABLES TO PRINT AS '' INSTEAD OF NULL > // > http://stackoverflow.com/questions/10517817/how-to-get-rid-of-null-when-concating-string-in-groovy > shell.evaluate("org.codehaus.groovy.runtime.NullObject.metaClass.toString = { > return '' }"); > {code} > And got the next exception. This used to work in Java 10 and before, it > crashes under Java 11. Could have something to do with java modules ? > {noformat} > Exception in thread "JavaFX Application Thread" BUG! exception in phase > 'semantic analysis' in source unit 'Script1.groovy' null > at > org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:970) > at > org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:633) > at > org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:582) > at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:324) > at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:294) > at groovy.lang.GroovyShell.parseClass(GroovyShell.java:558) > at groovy.lang.GroovyShell.parse(GroovyShell.java:570) > at groovy.lang.GroovyShell.evaluate(GroovyShell.java:454) > at groovy.lang.GroovyShell.evaluate(GroovyShell.java:493) > at groovy.lang.GroovyShell.evaluate(GroovyShell.java:464) > {noformat} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (GROOVY-8875) NullObject.metaClass
[ https://issues.apache.org/jira/browse/GROOVY-8875?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Paul King updated GROOVY-8875: -- Priority: Major (was: Blocker) > NullObject.metaClass > > > Key: GROOVY-8875 > URL: https://issues.apache.org/jira/browse/GROOVY-8875 > Project: Groovy > Issue Type: Bug >Reporter: Pruteanu Dragos >Priority: Major > Fix For: 3.x > > > Hi, > I execute this. The third shell.evaluate throws an exception: > {code} > final GroovyShell shell = new GroovyShell( binding, > FormsGroovyConfiguration.CONFIG ); > // THIS WILL FORCE NULL VARIABLES TO PRINT AS '' INSTEAD OF NULL > // > http://stackoverflow.com/questions/10517817/how-to-get-rid-of-null-when-concating-string-in-groovy > shell.evaluate("org.codehaus.groovy.runtime.NullObject.metaClass.toString = { > return '' }"); > {code} > And got the next exception. This used to work in Java 10 and before, it > crashes under Java 11. Could have something to do with java modules ? > {noformat} > Exception in thread "JavaFX Application Thread" BUG! exception in phase > 'semantic analysis' in source unit 'Script1.groovy' null > at > org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:970) > at > org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:633) > at > org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:582) > at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:324) > at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:294) > at groovy.lang.GroovyShell.parseClass(GroovyShell.java:558) > at groovy.lang.GroovyShell.parse(GroovyShell.java:570) > at groovy.lang.GroovyShell.evaluate(GroovyShell.java:454) > at groovy.lang.GroovyShell.evaluate(GroovyShell.java:493) > at groovy.lang.GroovyShell.evaluate(GroovyShell.java:464) > {noformat} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (GROOVY-8875) NullObject.metaClass
[ https://issues.apache.org/jira/browse/GROOVY-8875?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Paul King updated GROOVY-8875: -- Description: Hi, I execute this. The third shell.evaluate throws an exception: {code} final GroovyShell shell = new GroovyShell( binding, FormsGroovyConfiguration.CONFIG ); // THIS WILL FORCE NULL VARIABLES TO PRINT AS '' INSTEAD OF NULL // http://stackoverflow.com/questions/10517817/how-to-get-rid-of-null-when-concating-string-in-groovy shell.evaluate("org.codehaus.groovy.runtime.NullObject.metaClass.toString = { return '' }"); {code} And got the next exception. This used to work in Java 10 and before, it crashes under Java 11. Could have something to do with java modules ? {noformat} Exception in thread "JavaFX Application Thread" BUG! exception in phase 'semantic analysis' in source unit 'Script1.groovy' null at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:970) at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:633) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:582) at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:324) at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:294) at groovy.lang.GroovyShell.parseClass(GroovyShell.java:558) at groovy.lang.GroovyShell.parse(GroovyShell.java:570) at groovy.lang.GroovyShell.evaluate(GroovyShell.java:454) at groovy.lang.GroovyShell.evaluate(GroovyShell.java:493) at groovy.lang.GroovyShell.evaluate(GroovyShell.java:464) {noformat} was: Hi, I execute this. The third shell.evaluate throws an exception: {code} final GroovyShell shell = new GroovyShell( binding, FormsGroovyConfiguration.CONFIG ); // THIS WILL FORCE NULL VARIABLES TO PRINT AS '' INSTEAD OF NULL // http://stackoverflow.com/questions/10517817/how-to-get-rid-of-null-when-concating-string-in-groovy shell.evaluate("org.codehaus.groovy.runtime.NullObject.metaClass.toString = \{return ''}"); {code} And got the next exception. This used to work in Java 10 and before, it crashes under Java 11. Could have something to do with java modules ? {noformat} Exception in thread "JavaFX Application Thread" BUG! exception in phase 'semantic analysis' in source unit 'Script1.groovy' null at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:970) at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:633) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:582) at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:324) at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:294) at groovy.lang.GroovyShell.parseClass(GroovyShell.java:558) at groovy.lang.GroovyShell.parse(GroovyShell.java:570) at groovy.lang.GroovyShell.evaluate(GroovyShell.java:454) at groovy.lang.GroovyShell.evaluate(GroovyShell.java:493) at groovy.lang.GroovyShell.evaluate(GroovyShell.java:464) {noformat} > NullObject.metaClass > > > Key: GROOVY-8875 > URL: https://issues.apache.org/jira/browse/GROOVY-8875 > Project: Groovy > Issue Type: Bug >Reporter: Pruteanu Dragos >Priority: Blocker > Fix For: 3.x > > > Hi, > I execute this. The third shell.evaluate throws an exception: > {code} > final GroovyShell shell = new GroovyShell( binding, > FormsGroovyConfiguration.CONFIG ); > // THIS WILL FORCE NULL VARIABLES TO PRINT AS '' INSTEAD OF NULL > // > http://stackoverflow.com/questions/10517817/how-to-get-rid-of-null-when-concating-string-in-groovy > shell.evaluate("org.codehaus.groovy.runtime.NullObject.metaClass.toString = { > return '' }"); > {code} > And got the next exception. This used to work in Java 10 and before, it > crashes under Java 11. Could have something to do with java modules ? > {noformat} > Exception in thread "JavaFX Application Thread" BUG! exception in phase > 'semantic analysis' in source unit 'Script1.groovy' null > at > org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:970) > at > org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:633) > at > org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:582) > at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:324) > at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:294) > at groovy.lang.GroovyShell.parseClass(GroovyShell.java:558) > at groovy.lang.GroovyShell.parse(GroovyShell.java:570) > at groovy.lang.GroovyShell.evaluate(GroovyShell.java:454) > at groovy.lang.GroovyShell.evaluate(GroovyShell.java:493) > at groovy.lang.GroovyShell.evaluate(GroovyShell.java:464) > {noformat} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (GROOVY-8875) NullObject.metaClass
[ https://issues.apache.org/jira/browse/GROOVY-8875?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Paul King updated GROOVY-8875: -- Description: Hi, I execute this. The third shell.evaluate throws an exception: {code} final GroovyShell shell = new GroovyShell( binding, FormsGroovyConfiguration.CONFIG ); // THIS WILL FORCE NULL VARIABLES TO PRINT AS '' INSTEAD OF NULL // http://stackoverflow.com/questions/10517817/how-to-get-rid-of-null-when-concating-string-in-groovy shell.evaluate("org.codehaus.groovy.runtime.NullObject.metaClass.toString = \{return ''}"); {code} And got the next exception. This used to work in Java 10 and before, it crashes under Java 11. Could have something to do with java modules ? {noformat} Exception in thread "JavaFX Application Thread" BUG! exception in phase 'semantic analysis' in source unit 'Script1.groovy' null at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:970) at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:633) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:582) at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:324) at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:294) at groovy.lang.GroovyShell.parseClass(GroovyShell.java:558) at groovy.lang.GroovyShell.parse(GroovyShell.java:570) at groovy.lang.GroovyShell.evaluate(GroovyShell.java:454) at groovy.lang.GroovyShell.evaluate(GroovyShell.java:493) at groovy.lang.GroovyShell.evaluate(GroovyShell.java:464) {noformat} was: Hi, I execute this. The third shell.evaluate throws an exception: final GroovyShell shell = new GroovyShell( binding, FormsGroovyConfiguration.CONFIG ); // THIS WILL FORCE NULL VARIABLES TO PRINT AS '' INSTEAD OF NULL // http://stackoverflow.com/questions/10517817/how-to-get-rid-of-null-when-concating-string-in-groovy shell.evaluate("org.codehaus.groovy.runtime.NullObject.metaClass.toString = \{return ''}"); And got the next exception. This used to work in Java 10 and before, it crashes under Java 11. Could have something to do with java modules ? Exception in thread "JavaFX Application Thread" BUG! exception in phase 'semantic analysis' in source unit 'Script1.groovy' null at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:970) at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:633) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:582) at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:324) at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:294) at groovy.lang.GroovyShell.parseClass(GroovyShell.java:558) at groovy.lang.GroovyShell.parse(GroovyShell.java:570) at groovy.lang.GroovyShell.evaluate(GroovyShell.java:454) at groovy.lang.GroovyShell.evaluate(GroovyShell.java:493) at groovy.lang.GroovyShell.evaluate(GroovyShell.java:464) > NullObject.metaClass > > > Key: GROOVY-8875 > URL: https://issues.apache.org/jira/browse/GROOVY-8875 > Project: Groovy > Issue Type: Bug >Reporter: Pruteanu Dragos >Priority: Blocker > Fix For: 3.x > > > Hi, > I execute this. The third shell.evaluate throws an exception: > {code} > final GroovyShell shell = new GroovyShell( binding, > FormsGroovyConfiguration.CONFIG ); > // THIS WILL FORCE NULL VARIABLES TO PRINT AS '' INSTEAD OF NULL > // > http://stackoverflow.com/questions/10517817/how-to-get-rid-of-null-when-concating-string-in-groovy > shell.evaluate("org.codehaus.groovy.runtime.NullObject.metaClass.toString = > \{return ''}"); > {code} > And got the next exception. This used to work in Java 10 and before, it > crashes under Java 11. Could have something to do with java modules ? > {noformat} > Exception in thread "JavaFX Application Thread" BUG! exception in phase > 'semantic analysis' in source unit 'Script1.groovy' null > at > org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:970) > at > org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:633) > at > org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:582) > at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:324) > at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:294) > at groovy.lang.GroovyShell.parseClass(GroovyShell.java:558) > at groovy.lang.GroovyShell.parse(GroovyShell.java:570) > at groovy.lang.GroovyShell.evaluate(GroovyShell.java:454) > at groovy.lang.GroovyShell.evaluate(GroovyShell.java:493) > at groovy.lang.GroovyShell.evaluate(GroovyShell.java:464) > {noformat} -- This message was sent by Atlassian JIRA (v7.6.3#76005)