diff --git a/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/AnalyzeMethodsRequiringMetadataUsageFeature.java b/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/AnalyzeMethodsRequiringMetadataUsageFeature.java index 1c5861e83aea..1ada34bb0816 100644 --- a/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/AnalyzeMethodsRequiringMetadataUsageFeature.java +++ b/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/AnalyzeMethodsRequiringMetadataUsageFeature.java @@ -56,10 +56,6 @@ */ @AutomaticallyRegisteredFeature public final class AnalyzeMethodsRequiringMetadataUsageFeature implements InternalFeature { - public static final String METHODTYPE_REFLECTION = "reflection"; - public static final String METHODTYPE_RESOURCE = "resource"; - public static final String METHODTYPE_SERIALIZATION = "serialization"; - public static final String METHODTYPE_PROXY = "proxy"; private final Set jarPaths; private final Map>>> callsByJar; private final Set foldEntries = ConcurrentHashMap.newKeySet(); @@ -101,8 +97,8 @@ public void dumpReportForJar(String jarPath) { var builder = writer.objectBuilder()) { for (Map.Entry>> callEntry : calls.entrySet()) { try (JsonBuilder.ObjectBuilder methodsByTypeBuilder = builder.append(callEntry.getKey()).object()) { - Map> nestedMap = callEntry.getValue(); - for (Map.Entry> entry : nestedMap.entrySet()) { + Map> methodsByType = callEntry.getValue(); + for (Map.Entry> entry : methodsByType.entrySet()) { try (JsonBuilder.ArrayBuilder array = methodsByTypeBuilder.append(entry.getKey()).array()) { for (String call : entry.getValue()) { array.append(call); diff --git a/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/phases/AnalyzeMethodsRequiringMetadataUsagePhase.java b/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/phases/AnalyzeMethodsRequiringMetadataUsagePhase.java index 037c1b731ce9..258fcd5815b4 100644 --- a/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/phases/AnalyzeMethodsRequiringMetadataUsagePhase.java +++ b/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/phases/AnalyzeMethodsRequiringMetadataUsagePhase.java @@ -61,11 +61,6 @@ import java.util.Set; import java.util.random.RandomGeneratorFactory; -import static com.oracle.svm.hosted.AnalyzeMethodsRequiringMetadataUsageFeature.METHODTYPE_PROXY; -import static com.oracle.svm.hosted.AnalyzeMethodsRequiringMetadataUsageFeature.METHODTYPE_REFLECTION; -import static com.oracle.svm.hosted.AnalyzeMethodsRequiringMetadataUsageFeature.METHODTYPE_RESOURCE; -import static com.oracle.svm.hosted.AnalyzeMethodsRequiringMetadataUsageFeature.METHODTYPE_SERIALIZATION; - /** * This phase detects usages of any calls that might require metadata in reached parts of the * project, given the JAR files in which to search, and outputs and serializes them to the @@ -76,6 +71,11 @@ */ public class AnalyzeMethodsRequiringMetadataUsagePhase extends BasePhase { + public static final String METHODTYPE_REFLECTION = "reflection"; + public static final String METHODTYPE_RESOURCE = "resource"; + public static final String METHODTYPE_SERIALIZATION = "serialization"; + public static final String METHODTYPE_PROXY = "proxy"; + private static final Map> reflectMethodNames = new HashMap<>(); private static final Map> resourceMethodNames = new HashMap<>(); private static final Map> serializationMethodNames = new HashMap<>();