Java runtime NPE purposely thrown that interferes with metamodel #384

Closed
akberc opened this Issue Jan 4, 2014 · 4 comments

Comments

Projects
None yet
3 participants
Member

akberc commented Jan 4, 2014

Maybe a bug or a feature request, depending on what philosophy to use for percolating metamodel loading errors up the stack.

An NPE is being purposely thrown by the model loader at this location:

https://github.com/ceylon/ceylon.language/blob/master/runtime/com/redhat/ceylon/compiler/java/runtime/model/RuntimeModelLoader.java#L133

This exhibits in any call to com.redhat.ceylon.compiler.java.runtime.metamodel.FreeClassOrInterface.annotatedMemberDeclarations and other metamodel queries where a Java module is being used in the Ceylon module.

One instance in the SDK is ceylon.test.createTestRunner -> ceylon.test.internal.isTestableClass

Member

akberc commented Jan 4, 2014

Maybe related to: #346

Member

akberc commented Jan 10, 2014

@lucaswerkmeister Maybe related. I did run debug, but I didn't have time to add details earlier.

  • it is trying to get the metadata for a module
  • while recursing, it hits a Java module and that is an import of the first module.
  • metadata is not enabled for Java modules
  • module is null.
  • NPE is thrown.

@FroMage FroMage added this to the 1.1 milestone Apr 3, 2014

@FroMage FroMage added the Metamodel label Apr 3, 2014

Owner

FroMage commented Apr 8, 2014

I have not been able to reproduce it, and I did fix things related to this, so if you can test the latest IDE on master and reproduce it, please reopen and tell me how to reproduce it. Thanks!

@FroMage FroMage closed this Apr 8, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment