AP-6851: Java Snippet: runtime classloader too permissive -- possibly loading classes from different bundle


Is this bug fix related to the developer days conversation where for example if multiple plugins provide a CDK then the wrong class can be loaded when trying to use the Java Snippet POJO --> Cell / Cell --> POJO functionality?

Is this now safe, or an incremental improvent? 



Hi Sam!

Sorry for the delayed reply: Suppose two plugins provide a Java library (different versions of it for example). Then, yes, previously there was a chance that the wrong version of a class could be loaded for your Java Snippet. I am unsure whether that affected the class which was loaded for the POJO/Cell conversion, I wouldn't expect it, but I might only be remembering the recent code.

This part is safe now. We decided to never implicitly resolve plugin depedencies. Hence, if you require a class from your Java Snippet which isn't provided directly by the plugin which contains the custom DataType, then that class will currently not be available. We have some UI planned with which you will be able to add the required plugin in the future, but there is no ETA for that yet.

I hope I understood your question correctly!
Cheers, Jonathan.

Yes thanks, I was having the issue where I had provided an implementation for CDKCell access from the Java Snippet but multiple plugins provided (and exported?) a CDK jar and you couldn't guarantee the Java Snippet found the right one. 

Glad this is now working :)