Skip to content

Commit

Permalink
Make the fix closer to upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
simonis authored and zakkak committed Jun 12, 2024
1 parent fb4cd51 commit 23f6f5d
Showing 1 changed file with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -686,15 +686,13 @@ private static Function<String, Class<?>> getConstructorParameterClassAccessor(I
if (engineDescription == null) {
return null;
}
if (consParamClassFieldFinal.getName().equals("constructorParameterClassName")) {
String constructorParameterClassName = (String) consParamClassFieldFinal.get(engineDescription);
if (constructorParameterClassName != null) {
return loader.findClass(constructorParameterClassName).get();
} else {
return null;
}
if (consParamClassFieldFinal.getName().equals("constructorParameterClass")) {
return (Class<?>) consParamClassFieldFinal.get(engineDescription);
}
String constructorParameterClassName = (String) consParamClassFieldFinal.get(engineDescription);
if (constructorParameterClassName != null) {
return loader.findClass(constructorParameterClassName).get();
}
return (Class<?>) consParamClassFieldFinal.get(engineDescription);
} catch (IllegalAccessException e) {
VMError.shouldNotReachHere(e);
}
Expand Down

0 comments on commit 23f6f5d

Please sign in to comment.