Skip to content

Commit

Permalink
Fix missing null check in 'Adopt "JDK-8324646: Avoid Class.forName in…
Browse files Browse the repository at this point in the history
… SecureRandom constructor"'
  • Loading branch information
simonis authored and zakkak committed Jun 12, 2024
1 parent 0ca9d87 commit fb4cd51
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,12 @@ private static Function<String, Class<?>> getConstructorParameterClassAccessor(I
return null;
}
if (consParamClassFieldFinal.getName().equals("constructorParameterClassName")) {
return loader.findClass((String) consParamClassFieldFinal.get(engineDescription)).get();
String constructorParameterClassName = (String) consParamClassFieldFinal.get(engineDescription);
if (constructorParameterClassName != null) {
return loader.findClass(constructorParameterClassName).get();
} else {
return null;
}
}
return (Class<?>) consParamClassFieldFinal.get(engineDescription);
} catch (IllegalAccessException e) {
Expand Down

0 comments on commit fb4cd51

Please sign in to comment.