[jira] [Created] (GROOVY-8889) @NamedParam(required=true) is not enforced

2018-11-17 Thread JIRA
Vladimír Oraný created GROOVY-8889:
--

 Summary: @NamedParam(required=true) is not enforced
 Key: GROOVY-8889
 URL: https://issues.apache.org/jira/browse/GROOVY-8889
 Project: Groovy
  Issue Type: Bug
Affects Versions: 2.5.4
Reporter: Vladimír Oraný


in following snipped the required parameter is not enforced at all:


{code}
import groovy.transform.CompileStatic
import groovy.transform.NamedParam
import groovy.transform.NamedParams

@CompileStatic
class Tester {
String text
String color

static Tester note(String text, String color) {
return new Tester(text: text, color: color)
}
}

@CompileStatic
class TesterBuilder {
static Tester note(
@NamedParams([
@NamedParam(value = 'text', type = String, required = true),
@NamedParam(value = 'color', type = String)
])
Map params
) {
return Tester.note(params.text, params.color)
}
}


@CompileStatic
Tester useBuilder() {
return TesterBuilder.note(color: 'blue')
}

useBuilder()
{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (GROOVY-8879) @NamedVariant on extension method

2018-11-17 Thread JIRA


[ 
https://issues.apache.org/jira/browse/GROOVY-8879?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16690817#comment-16690817
 ] 

Vladimír Oraný commented on GROOVY-8879:


Right, now it makes sense! It would be great if there is such an option which 
would preserve the first argument. What about 
@NamedVariant(extensionMethod=true) which tells more about the purpose then the 
implementation?

> @NamedVariant on extension method
> -
>
> Key: GROOVY-8879
> URL: https://issues.apache.org/jira/browse/GROOVY-8879
> Project: Groovy
>  Issue Type: Bug
>  Components: Static compilation
>Affects Versions: 2.5.2
>Reporter: Vladimír Oraný
>Priority: Major
>
> I have a method on Java interface
>  
> {code:java}
> RelationshipDefinition source(String cardinality, String title);{code}
>  
> And I want to create an extension method (as using @NamedVariant in Java 
> sources is not supported)
>  
> {code:java}
> @NamedVariant
> static RelationshipDefinition source(RelationshipDefinition definition 
> @NamedDelegate TitleAndCardinality tac) {
> return definition.source(tac.cardinality, tac.title)
> }{code}
>  
> I got an error when I try to use the method such as follows:
>  
> {code:java}
> definition.source(cardinality: '1'){code}
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (GROOVY-8888) Strict @NamedParams

2018-11-17 Thread JIRA
Vladimír Oraný created GROOVY-:
--

 Summary: Strict @NamedParams
 Key: GROOVY-
 URL: https://issues.apache.org/jira/browse/GROOVY-
 Project: Groovy
  Issue Type: Improvement
Reporter: Vladimír Oraný


Thanks, [~paulk] for explaining how does all the "@Named*" annotation works. I 
have one suggestion for improvement:

At the moment when you add an extra entry in the map, the static compiler won't 
complain. Would be nice to add "strict" property to "@NamedParams" which will 
make any additional entry illegal.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (GROOVY-8875) NullObject.metaClass

2018-11-17 Thread Pruteanu Dragos (JIRA)


[ 
https://issues.apache.org/jira/browse/GROOVY-8875?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16690681#comment-16690681
 ] 

Pruteanu Dragos commented on GROOVY-8875:
-

I also found out that this happen when running the application from Intellij, 
and works fine when it runs stand-alone. I have created also a ticket for 
Intellij

> 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] [Issue Comment Deleted] (GROOVY-8880) Traits - static/instance init blocks

2018-11-17 Thread Anton Pryamostanov (JIRA)


 [ 
https://issues.apache.org/jira/browse/GROOVY-8880?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Anton Pryamostanov updated GROOVY-8880:
---
Comment: was deleted

(was: Please see above comment.)

> Traits - static/instance init blocks
> 
>
> Key: GROOVY-8880
> URL: https://issues.apache.org/jira/browse/GROOVY-8880
> Project: Groovy
>  Issue Type: Improvement
>  Components: Compiler, groovy-runtime
>Affects Versions: 2.5.2
>Reporter: Anton Pryamostanov
>Assignee: Paul King
>Priority: Major
> Fix For: 3.0.0-alpha-4, 2.5.5
>
>
> Let's consider the below examples of Traits with Init blocks:
>  *Instance init block:*
> {code}
> trait InstanceTrait {
> {
> System.out.println("Instance init")
> }
> }
> class InstanceTraitClass implements InstanceTrait {
> }
> new InstanceTraitClass()
> {code}
> This gives the below compilation exception:
> {code:java}
> General error during class generation: NPE while processing 
> script1542098577743.groovy
> groovy.lang.GroovyRuntimeException: NPE while processing 
> script1542098577743.groovy
> at 
> org.codehaus.groovy.classgen.AsmClassGenerator.visitClass(AsmClassGenerator.java:2
> at 
> org.codehaus.groovy.control.CompilationUnit$17.call(CompilationUnit.java:8
> at 
> org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:10
> at 
> org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:6
> at 
> org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:5
> at 
> org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:5
> at org.codehaus.groovy.control.CompilationUnit$compile$1.call(Unknown Sour
> at 
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:
> at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:1
> at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:1
> at 
> groovy.inspect.swingui.AstNodeToScriptAdapter.compileToScript(AstNodeToScriptAdapter.groovy:
> at 
> groovy.inspect.swingui.AstNodeToScriptAdapter$compileToScript.call(Unknown 
> Sour
> at 
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:
> at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:1
> at 
> groovy.inspect.swingui.AstBrowser$_decompile_closure6.doCall(AstBrowser.groovy:3
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Meth
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
> at java.lang.reflect.Method.invoke(Method.java:4
> at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:
> at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:3
> at 
> org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:2
> at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:10
> at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:10
> at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:10
> at groovy.lang.Closure.call(Closure.java:4
> at groovy.lang.Closure.call(Closure.java:4
> at groovy.lang.Closure.run(Closure.java:4
> at java.lang.Thread.run(Thread.java:7
> Caused by: java.lang.NullPointerException
> at 
> org.codehaus.groovy.classgen.asm.CallSiteWriter.prepareCallSite(CallSiteWriter.java:2
> at 
> org.codehaus.groovy.classgen.asm.CallSiteWriter.prepareSiteAndReceiver(CallSiteWriter.java:2
> at 
> org.codehaus.groovy.classgen.asm.CallSiteWriter.prepareSiteAndReceiver(CallSiteWriter.java:2
> at 
> org.codehaus.groovy.classgen.asm.CallSiteWriter.makeCallSite(CallSiteWriter.java:2
> at 
> org.codehaus.groovy.classgen.asm.InvocationWriter.makeCachedCall(InvocationWriter.java:3
> at 
> org.codehaus.groovy.classgen.asm.InvocationWriter.makeCall(InvocationWriter.java:3
> at 
> org.codehaus.groovy.classgen.asm.InvocationWriter.makeCall(InvocationWriter.java:1
> at 
> org.codehaus.groovy.classgen.asm.InvocationWriter.makeInvokeMethodCall(InvocationWriter.java:
> at 
> org.codehaus.groovy.classgen.asm.InvocationWriter.writeInvokeMethod(InvocationWriter.java:4
> at 
> org.codehaus.groovy.classgen.AsmClassGenerator.visitMethodCallExpression(AsmClassGenerator.java:7
> at 
> org.codehaus.groovy.ast.expr.MethodCallExpression.visit(MethodCallExpression.java:
> at 
> org.codehaus.groovy.classgen.asm.StatementWriter.writeExpressionStatement(StatementWriter.java:6
> at 
> 

[jira] [Commented] (GROOVY-8875) NullObject.metaClass

2018-11-17 Thread Pruteanu Dragos (JIRA)


[ 
https://issues.apache.org/jira/browse/GROOVY-8875?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16690666#comment-16690666
 ] 

Pruteanu Dragos commented on GROOVY-8875:
-

Below a stack trace with Java 11 on Ubuntu. Is any other alternative to tell 
Groovy not to print NULL on null objects in templates (and just empty string) ?

 

07:38:03 BUG! exception in phase 'semantic analysis' in source unit 
'Script1.groovy' null
  at 
org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:972)
  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:354)
  at groovy.lang.GroovyClassLoader.access$300(GroovyClassLoader.java:87)
  at groovy.lang.GroovyClassLoader$5.provide(GroovyClassLoader.java:323)
  at groovy.lang.GroovyClassLoader$5.provide(GroovyClassLoader.java:320)
  at 
org.codehaus.groovy.runtime.memoize.StampedCommonCache.compute(StampedCommonCache.java:162)
  at 
org.codehaus.groovy.runtime.memoize.StampedCommonCache.getAndPut(StampedCommonCache.java:153)
  at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:318)
  at groovy.lang.GroovyShell.parseClass(GroovyShell.java:547)
  at groovy.lang.GroovyShell.parse(GroovyShell.java:559)
  at groovy.lang.GroovyShell.evaluate(GroovyShell.java:443)
  at groovy.lang.GroovyShell.evaluate(GroovyShell.java:482)
  at groovy.lang.GroovyShell.evaluate(GroovyShell.java:453)
  at 
com.wisecoders.dbs.rdbms.sync.engine.diffs.SimpleStatement.toString(SimpleStatement.java:70)

> 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] [Reopened] (GROOVY-8880) Traits - static/instance init blocks

2018-11-17 Thread Anton Pryamostanov (JIRA)


 [ 
https://issues.apache.org/jira/browse/GROOVY-8880?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Anton Pryamostanov reopened GROOVY-8880:


Please see above comment.

> Traits - static/instance init blocks
> 
>
> Key: GROOVY-8880
> URL: https://issues.apache.org/jira/browse/GROOVY-8880
> Project: Groovy
>  Issue Type: Improvement
>  Components: Compiler, groovy-runtime
>Affects Versions: 2.5.2
>Reporter: Anton Pryamostanov
>Assignee: Paul King
>Priority: Major
> Fix For: 3.0.0-alpha-4, 2.5.5
>
>
> Let's consider the below examples of Traits with Init blocks:
>  *Instance init block:*
> {code}
> trait InstanceTrait {
> {
> System.out.println("Instance init")
> }
> }
> class InstanceTraitClass implements InstanceTrait {
> }
> new InstanceTraitClass()
> {code}
> This gives the below compilation exception:
> {code:java}
> General error during class generation: NPE while processing 
> script1542098577743.groovy
> groovy.lang.GroovyRuntimeException: NPE while processing 
> script1542098577743.groovy
> at 
> org.codehaus.groovy.classgen.AsmClassGenerator.visitClass(AsmClassGenerator.java:2
> at 
> org.codehaus.groovy.control.CompilationUnit$17.call(CompilationUnit.java:8
> at 
> org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:10
> at 
> org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:6
> at 
> org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:5
> at 
> org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:5
> at org.codehaus.groovy.control.CompilationUnit$compile$1.call(Unknown Sour
> at 
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:
> at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:1
> at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:1
> at 
> groovy.inspect.swingui.AstNodeToScriptAdapter.compileToScript(AstNodeToScriptAdapter.groovy:
> at 
> groovy.inspect.swingui.AstNodeToScriptAdapter$compileToScript.call(Unknown 
> Sour
> at 
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:
> at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:1
> at 
> groovy.inspect.swingui.AstBrowser$_decompile_closure6.doCall(AstBrowser.groovy:3
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Meth
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
> at java.lang.reflect.Method.invoke(Method.java:4
> at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:
> at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:3
> at 
> org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:2
> at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:10
> at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:10
> at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:10
> at groovy.lang.Closure.call(Closure.java:4
> at groovy.lang.Closure.call(Closure.java:4
> at groovy.lang.Closure.run(Closure.java:4
> at java.lang.Thread.run(Thread.java:7
> Caused by: java.lang.NullPointerException
> at 
> org.codehaus.groovy.classgen.asm.CallSiteWriter.prepareCallSite(CallSiteWriter.java:2
> at 
> org.codehaus.groovy.classgen.asm.CallSiteWriter.prepareSiteAndReceiver(CallSiteWriter.java:2
> at 
> org.codehaus.groovy.classgen.asm.CallSiteWriter.prepareSiteAndReceiver(CallSiteWriter.java:2
> at 
> org.codehaus.groovy.classgen.asm.CallSiteWriter.makeCallSite(CallSiteWriter.java:2
> at 
> org.codehaus.groovy.classgen.asm.InvocationWriter.makeCachedCall(InvocationWriter.java:3
> at 
> org.codehaus.groovy.classgen.asm.InvocationWriter.makeCall(InvocationWriter.java:3
> at 
> org.codehaus.groovy.classgen.asm.InvocationWriter.makeCall(InvocationWriter.java:1
> at 
> org.codehaus.groovy.classgen.asm.InvocationWriter.makeInvokeMethodCall(InvocationWriter.java:
> at 
> org.codehaus.groovy.classgen.asm.InvocationWriter.writeInvokeMethod(InvocationWriter.java:4
> at 
> org.codehaus.groovy.classgen.AsmClassGenerator.visitMethodCallExpression(AsmClassGenerator.java:7
> at 
> org.codehaus.groovy.ast.expr.MethodCallExpression.visit(MethodCallExpression.java:
> at 
> org.codehaus.groovy.classgen.asm.StatementWriter.writeExpressionStatement(StatementWriter.java:6
> at 
> 

[jira] [Commented] (GROOVY-8880) Traits - static/instance init blocks

2018-11-17 Thread Anton Pryamostanov (JIRA)


[ 
https://issues.apache.org/jira/browse/GROOVY-8880?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16690661#comment-16690661
 ] 

Anton Pryamostanov commented on GROOVY-8880:


Retested OK on 2.5.5.SNAPSHOT.
However retest *failed* on 3.0.0-SNAPSHOT:
Instance init (same code as in issue description) Class Generation Compiler 
phase:
{code}
Unable to produce AST for this phase due to earlier compilation error:
startup failed:
General error during class generation: NPE while processing 
script1542479731682.groovy

groovy.lang.GroovyRuntimeException: NPE while processing 
script1542479731682.groovy
at 
org.codehaus.groovy.classgen.AsmClassGenerator.visitClass(AsmClassGenerator.java:2
at 
org.codehaus.groovy.control.CompilationUnit$18.call(CompilationUnit.java:8
at 
org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:10
at 
org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:6
at 
org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:6
at 
org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:6
at 
groovy.inspect.swingui.AstNodeToScriptAdapter.compileToScript(AstNodeToScriptAdapter.groovy:1
at 
groovy.inspect.swingui.AstNodeToScriptAdapter$compileToScript.call(Unknown Sour
at 
groovy.inspect.swingui.AstBrowser$_decompile_closure7.doCall(AstBrowser.groovy:4
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Meth
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
at java.lang.reflect.Method.invoke(Method.java:4
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:1
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:3
at 
org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:2
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:10
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:11
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:10
at groovy.lang.Closure.call(Closure.java:4
at groovy.lang.Closure.call(Closure.java:4
at groovy.lang.Closure.run(Closure.java:4
at java.lang.Thread.run(Thread.java:7
Caused by: java.lang.NullPointerException
at 
org.codehaus.groovy.classgen.asm.CallSiteWriter.prepareCallSite(CallSiteWriter.java:2
at 
org.codehaus.groovy.classgen.asm.CallSiteWriter.prepareSiteAndReceiver(CallSiteWriter.java:2
at 
org.codehaus.groovy.classgen.asm.CallSiteWriter.prepareSiteAndReceiver(CallSiteWriter.java:2
at 
org.codehaus.groovy.classgen.asm.CallSiteWriter.makeCallSite(CallSiteWriter.java:2
at 
org.codehaus.groovy.classgen.asm.InvocationWriter.makeCachedCall(InvocationWriter.java:3
at 
org.codehaus.groovy.classgen.asm.InvocationWriter.makeCall(InvocationWriter.java:4
at 
org.codehaus.groovy.classgen.asm.InvocationWriter.makeCall(InvocationWriter.java:1
at 
org.codehaus.groovy.classgen.asm.InvocationWriter.makeInvokeMethodCall(InvocationWriter.java:1
at 
org.codehaus.groovy.classgen.asm.InvocationWriter.writeInvokeMethod(InvocationWriter.java:5
at 
org.codehaus.groovy.classgen.AsmClassGenerator.visitMethodCallExpression(AsmClassGenerator.java:8
at 
org.codehaus.groovy.ast.expr.MethodCallExpression.visit(MethodCallExpression.java:
at 
org.codehaus.groovy.classgen.asm.StatementWriter.writeExpressionStatement(StatementWriter.java:6
at 
org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeExpressionStatement(OptimizingStatementWriter.java:4
at 
org.codehaus.groovy.classgen.AsmClassGenerator.visitExpressionStatement(AsmClassGenerator.java:6
at 
org.codehaus.groovy.ast.stmt.ExpressionStatement.visit(ExpressionStatement.java:
at 
org.codehaus.groovy.classgen.asm.StatementWriter.writeBlockStatement(StatementWriter.java:
at 
org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeBlockStatement(OptimizingStatementWriter.java:2
at 
org.codehaus.groovy.classgen.AsmClassGenerator.visitBlockStatement(AsmClassGenerator.java:6
at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:
at 
org.codehaus.groovy.classgen.asm.StatementWriter.writeBlockStatement(StatementWriter.java:
at 
org.codehaus.groovy.classgen.asm.OptimigStatementWriter.writeBlockStatement(OptimizingStatementWriter.java:205)
at 
org.codehaus.groovy.classgen.AsmClassGenerator.visitBlockStatement(AsmClassGenerator.java:6
at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:
at 
org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitObjectInitializerStatements(ClassCodeVisitorSupport.java:
at 
org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:
at 

[jira] [Updated] (GROOVY-8886) Bump asciidoctor-gradle-plugin to 1.5.9.2

2018-11-17 Thread Daniel Sun (JIRA)


 [ 
https://issues.apache.org/jira/browse/GROOVY-8886?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Daniel Sun updated GROOVY-8886:
---
Fix Version/s: (was: 3.0.0-alpha-4)

> Bump asciidoctor-gradle-plugin to 1.5.9.2
> -
>
> Key: GROOVY-8886
> URL: https://issues.apache.org/jira/browse/GROOVY-8886
> Project: Groovy
>  Issue Type: Dependency upgrade
>Reporter: Daniel Sun
>Assignee: Daniel Sun
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Reopened] (GROOVY-8886) Bump asciidoctor-gradle-plugin to 1.5.9.2

2018-11-17 Thread Daniel Sun (JIRA)


 [ 
https://issues.apache.org/jira/browse/GROOVY-8886?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Daniel Sun reopened GROOVY-8886:


build failed due to 
http://ci.groovy-lang.org/viewLog.html?buildId=53367=buildResultsDiv=Groovy_Jdk8Build_PlusSnapshotDeploy=1

> Bump asciidoctor-gradle-plugin to 1.5.9.2
> -
>
> Key: GROOVY-8886
> URL: https://issues.apache.org/jira/browse/GROOVY-8886
> Project: Groovy
>  Issue Type: Dependency upgrade
>Reporter: Daniel Sun
>Assignee: Daniel Sun
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (GROOVY-8887) Support multi-assignment of tuples in STC

2018-11-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/GROOVY-8887?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16690623#comment-16690623
 ] 

ASF GitHub Bot commented on GROOVY-8887:


Github user asfgit closed the pull request at:

https://github.com/apache/groovy/pull/824


> Support multi-assignment of tuples in STC
> -
>
> Key: GROOVY-8887
> URL: https://issues.apache.org/jira/browse/GROOVY-8887
> Project: Groovy
>  Issue Type: Improvement
>Reporter: Daniel Sun
>Assignee: Daniel Sun
>Priority: Major
> Fix For: 3.0.0-alpha-4
>
>
> Just to support Tuple1, Tuple2, ..., Tuple16 multiple assignment, because 
> these types have exact elements with exact types.
> Note: Tuple is not supported, because the count of its elements depends on 
> runtime(not compile time)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (GROOVY-8887) Support multi-assignment of tuples in STC

2018-11-17 Thread Daniel Sun (JIRA)


 [ 
https://issues.apache.org/jira/browse/GROOVY-8887?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Daniel Sun resolved GROOVY-8887.

   Resolution: Fixed
Fix Version/s: 3.0.0-alpha-4

Fixed by 
https://github.com/apache/groovy/commit/f364a0c4bff71a3f9eb688285ef58c314a61ae8e

> Support multi-assignment of tuples in STC
> -
>
> Key: GROOVY-8887
> URL: https://issues.apache.org/jira/browse/GROOVY-8887
> Project: Groovy
>  Issue Type: Improvement
>Reporter: Daniel Sun
>Assignee: Daniel Sun
>Priority: Major
> Fix For: 3.0.0-alpha-4
>
>
> Just to support Tuple1, Tuple2, ..., Tuple16 multiple assignment, because 
> these types have exact elements with exact types.
> Note: Tuple is not supported, because the count of its elements depends on 
> runtime(not compile time)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] groovy pull request #824: GROOVY-8887: Support multi-assignment of tuples in...

2018-11-17 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/groovy/pull/824


---


[jira] [Updated] (GROOVY-8887) Support multi-assignment of tuples in STC

2018-11-17 Thread Daniel Sun (JIRA)


 [ 
https://issues.apache.org/jira/browse/GROOVY-8887?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Daniel Sun updated GROOVY-8887:
---
Description: 
Just to support Tuple1, Tuple2, ..., Tuple16 multiple assignment, because these 
types have exact elements with exact types.
Note: Tuple is not supported, because the count of its elements depends on 
runtime(not compile time)

> Support multi-assignment of tuples in STC
> -
>
> Key: GROOVY-8887
> URL: https://issues.apache.org/jira/browse/GROOVY-8887
> Project: Groovy
>  Issue Type: Improvement
>Reporter: Daniel Sun
>Assignee: Daniel Sun
>Priority: Major
>
> Just to support Tuple1, Tuple2, ..., Tuple16 multiple assignment, because 
> these types have exact elements with exact types.
> Note: Tuple is not supported, because the count of its elements depends on 
> runtime(not compile time)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (GROOVY-8887) Support multi-assignment of tuples in STC

2018-11-17 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/GROOVY-8887?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16690490#comment-16690490
 ] 

ASF GitHub Bot commented on GROOVY-8887:


GitHub user danielsun1106 opened a pull request:

https://github.com/apache/groovy/pull/824

GROOVY-8887: Support multi-assignment of tuples in STC



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/danielsun1106/groovy stc-tuple

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/groovy/pull/824.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #824


commit b405028c7bd113f974b8db22c1075d032bd7fa2e
Author: danielsun1106 
Date:   2018-11-17T11:02:38Z

GROOVY-8887: Support multi-assignment of tuples in STC




> Support multi-assignment of tuples in STC
> -
>
> Key: GROOVY-8887
> URL: https://issues.apache.org/jira/browse/GROOVY-8887
> Project: Groovy
>  Issue Type: Improvement
>Reporter: Daniel Sun
>Assignee: Daniel Sun
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] groovy pull request #824: GROOVY-8887: Support multi-assignment of tuples in...

2018-11-17 Thread danielsun1106
GitHub user danielsun1106 opened a pull request:

https://github.com/apache/groovy/pull/824

GROOVY-8887: Support multi-assignment of tuples in STC



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/danielsun1106/groovy stc-tuple

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/groovy/pull/824.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #824


commit b405028c7bd113f974b8db22c1075d032bd7fa2e
Author: danielsun1106 
Date:   2018-11-17T11:02:38Z

GROOVY-8887: Support multi-assignment of tuples in STC




---


[jira] [Created] (GROOVY-8887) Support multi-assignment of tuples in STC

2018-11-17 Thread Daniel Sun (JIRA)
Daniel Sun created GROOVY-8887:
--

 Summary: Support multi-assignment of tuples in STC
 Key: GROOVY-8887
 URL: https://issues.apache.org/jira/browse/GROOVY-8887
 Project: Groovy
  Issue Type: Improvement
Reporter: Daniel Sun
Assignee: Daniel Sun






--
This message was sent by Atlassian JIRA
(v7.6.3#76005)