diff --git a/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/SecurityServicesFeature.java b/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/SecurityServicesFeature.java index 5b50b2847865..136bb0e53d7d 100644 --- a/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/SecurityServicesFeature.java +++ b/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/SecurityServicesFeature.java @@ -686,15 +686,13 @@ private static Function> 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); }