Two questions about parameter nullness in the JDK

Michael Ernst mernst at
Mon Jun 2 02:40:03 UTC 2014

I have a couple of questions about places that the JDK is under-specified 
with respect to nullness properties.

Many GitHub projects pass null as the implVendor argument to 

However, the ClassLoader.definePackage documentation does not say whether 
null is permitted or forbidden as an argument.  Could you clarify and 
document this issue?

Another example is ClassFileTransformer.transform.  It seems safe to pass 
in a null protectionDomain to the current implementation:

However, the documentation does not explicitly state whether null is 
permitted or forbidden.  I'd like to get a ruling on this issue so that it 
can be documented as well.

Thanks very much for your help!


More information about the core-libs-dev mailing list