graalvm / mandrel

Mandrel is a downstream distribution of the GraalVM community edition. Mandrel's main goal is to provide a native-image release specifically to support Quarkus.
Other
397 stars 15 forks source link

Fix missing null check in 'Adopt "JDK-8324646: Avoid Class.forName in SecureRandom constructor"' #745

Closed simonis closed 5 months ago

simonis commented 5 months ago

We are missing a null-check in SecurityServicesFeature::getConstructorParameterClassAccessor() introduced by #738 because consParamClassFieldFinal.get(engineDescription) can be null:

if (consParamClassFieldFinal.getName().equals("constructorParameterClassName")) {
    return loader.findClass((String) consParamClassFieldFinal.get(engineDescription)).get();
}
simonis commented 5 months ago

Thanks for the reviews @jerboaa, @zakkak. I've updated the PR according to your suggestion.