You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (Jira)" <ji...@apache.org> on 2020/09/15 17:18:00 UTC
[jira] [Comment Edited] (GROOVY-9739) NPE in
ClassNode.isDerivedFrom while compiling trait with Groovy 3.0.5
[ https://issues.apache.org/jira/browse/GROOVY-9739?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17196208#comment-17196208 ]
Eric Milles edited comment on GROOVY-9739 at 9/15/20, 5:17 PM:
---------------------------------------------------------------
To debug the Groovy compiler, I needed to add {{groovyOptions.fork = false}} to {{tasks.withType(GroovyCompile)}} in build.gradle in addition to {{-Dorg.gradle.debug=true}} on the gradle command line.
The null cast is created by {{TraitReceiverTransformer}} when it is processing a field reference for the "client" reference in {{BTCTestSupport}}. If I change "client" to "getClient()", the problem moves to the next property reference (fundingSource).
I will try to isolate the problem in a smaller set of sources.
was (Author: emilles):
To debug the Groovy compiler, I needed to add {{groovyOptions.fork = false}} to {{tasks.withType(GroovyCompile)}} in build.gradle in addition to {{-Dorg.gradle.debug=true}} on the gradle command line.
The null cast is created by {{TraitReceiverTransformer}} when it is processing a {{FieldExpression}} for the "client" reference in {{BTCTestSupport}}. If I change "client" to "getClient()", the problem moves to the next property reference (fundingSource).
I will try to isolate the problem in a smaller set of sources.
> NPE in ClassNode.isDerivedFrom while compiling trait with Groovy 3.0.5
> ----------------------------------------------------------------------
>
> Key: GROOVY-9739
> URL: https://issues.apache.org/jira/browse/GROOVY-9739
> Project: Groovy
> Issue Type: Bug
> Components: Compiler
> Affects Versions: 3.0.5
> Environment: Travis CI Ubuntu (also macOS) JDK 9
> Reporter: Sean Gilligan
> Assignee: Eric Milles
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Compiler crashes in Gradle build with Groovy 3.0.5. Works with Groovy 3.0.4.
> Caused by: java.lang.NullPointerException
> at org.codehaus.groovy.ast.ClassNode.isDerivedFrom(ClassNode.java:909)
> at org.codehaus.groovy.ast.tools.WideningCategories.implementsInterfaceOrSubclassOf(WideningCategories.java:733)
> at org.codehaus.groovy.classgen.AsmClassGenerator.visitCastExpression(AsmClassGenerator.java:799)
> at org.codehaus.groovy.ast.expr.CastExpression.visit(CastExpression.java:85)
> Fails with both JDK 8 and JDK 9, see Travis CI jobs:
> Failure: [https://travis-ci.org/github/ConsensusJ/consensusj/jobs/716458220]
> Success: https://travis-ci.org/github/ConsensusJ/consensusj/builds/726709254
--
This message was sent by Atlassian Jira
(v8.3.4#803005)