From 23f6f5d5f26421859ca4b00b82357e0343c66500 Mon Sep 17 00:00:00 2001 From: Volker Simonis Date: Wed, 12 Jun 2024 12:00:46 +0200 Subject: [PATCH] Make the fix closer to upstream --- .../oracle/svm/hosted/SecurityServicesFeature.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) 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); }