[
https://issues.apache.org/jira/browse/GROOVY-9462?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Paul King updated GROOVY-9462:
------------------------------
Fix Version/s: 2.5.15
> Groovy 3 BUG! exception in phase 'conversion' in source unit Caused by
> NullPointerException
> --------------------------------------------------------------------------------------------
>
> Key: GROOVY-9462
> URL: https://issues.apache.org/jira/browse/GROOVY-9462
> Project: Groovy
> Issue Type: Bug
> Components: Compiler
> Affects Versions: 3.0.2
> Reporter: Puneet Behl
> Assignee: Eric Milles
> Priority: Major
> Fix For: 4.0.0-alpha-1, 3.0.3, 2.5.15
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> After updating to Groovy 3.0.3-SNAPSHOT we are seeing the following exception:
> {code:java}
> Caused by: BUG! exception in phase 'conversion' in source unit
> '~/gorm-neo4j/grails-datastore-gorm-neo4j/src/main/groovy/org/grails/datastore/gorm/neo4j/collection/Neo4jRelationship.groovy'
> unexpected NullPointerException
> at
> org.gradle.api.internal.tasks.compile.ApiGroovyCompiler.execute(ApiGroovyCompiler.java:179)
> at
> org.gradle.api.internal.tasks.compile.ApiGroovyCompiler.execute(ApiGroovyCompiler.java:57)
> at
> org.gradle.api.internal.tasks.compile.GroovyCompilerFactory$DaemonSideCompiler.execute(GroovyCompilerFactory.java:80)
> at
> org.gradle.api.internal.tasks.compile.GroovyCompilerFactory$DaemonSideCompiler.execute(GroovyCompilerFactory.java:68)
> at
> org.gradle.api.internal.tasks.compile.daemon.AbstractDaemonCompiler$CompilerCallable.call(AbstractDaemonCompiler.java:86)
> at
> org.gradle.api.internal.tasks.compile.daemon.AbstractDaemonCompiler$CompilerCallable.call(AbstractDaemonCompiler.java:74)
> at
> org.gradle.workers.internal.DefaultWorkerServer.execute(DefaultWorkerServer.java:42)
> at
> org.gradle.workers.internal.WorkerDaemonServer.execute(WorkerDaemonServer.java:36)
> at
> org.gradle.process.internal.worker.request.WorkerAction.run(WorkerAction.java:102)
> at
> org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
> at
> org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
> at
> org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:175)
> at
> org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:157)
> at
> org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:404)
> ... 3 more
> Caused by: java.lang.NullPointerException
> ... 17 more
> {code}
> I tried to debug the problem and found out that the {{NullPointerException}}
> is caused by {{JavaStubGenerator.printType}} method in the following lines:
> {code:java}
> out.print(type.getGenericsTypes()[0].getName());
> {code}
> In the above code, the {{ClassNode type}} is the return type of the getter
> method {{getFrom}} in the class
> [Relationship.groovy|https://github.com/grails/gorm-neo4j/blob/groovy3/grails-datastore-gorm-neo4j/src/main/groovy/grails/neo4j/Relationship.groovy#L31]
> where {{type.getGenericsTypes()}} is now a {{null}} value.
> Please clone the following repository and run {{./gradlew
> :grails-datastore-gorm-neo4j:testClasses}} task to replicate the error:
> [https://github.com/grails/gorm-neo4j/tree/groovy3]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)