Skip to content

Commit 6c4b032

Browse files
committed
Consider all types as unsafe allocated
1 parent dea1968 commit 6c4b032

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/configure/LegacyReflectionConfigurationParser.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ protected void parseClass(EconomicMap<String, Object> data) {
117117
delegate.registerDeclaredFields(queryCondition, true, clazz);
118118
delegate.registerPublicFields(queryCondition, true, clazz);
119119
}
120-
registerIfNotDefault(data, false, clazz, "unsafeAllocated", () -> delegate.registerUnsafeAllocated(condition, clazz));
120+
registerIfNotDefault(data, true, clazz, "unsafeAllocated", () -> delegate.registerUnsafeAllocated(condition, clazz));
121121
MapCursor<String, Object> cursor = data.getEntries();
122122
while (cursor.advance()) {
123123
String name = cursor.getKey();

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/configure/ReflectionConfigurationParser.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ protected void parseClassArray(List<Object> classes) {
7777

7878
protected void registerIfNotDefault(EconomicMap<String, Object> data, boolean defaultValue, T clazz, String propertyName, Runnable register) {
7979
if (data.containsKey(propertyName)) {
80-
RuntimeReflectionSupport.increaseCount(false);
80+
RuntimeReflectionSupport.increaseCount(defaultValue);
8181
}
8282
if (data.containsKey(propertyName) ? asBoolean(data.get(propertyName), propertyName) : defaultValue) {
8383
try {

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/configure/ReflectionMetadataParser.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ protected void parseClass(EconomicMap<String, Object> data) {
107107
registerIfNotDefault(data, false, clazz, "allPublicMethods", () -> delegate.registerPublicMethods(condition, false, clazz));
108108
registerIfNotDefault(data, false, clazz, "allDeclaredFields", () -> delegate.registerDeclaredFields(condition, false, clazz));
109109
registerIfNotDefault(data, false, clazz, "allPublicFields", () -> delegate.registerPublicFields(condition, false, clazz));
110-
registerIfNotDefault(data, false, clazz, "unsafeAllocated", () -> delegate.registerUnsafeAllocated(condition, clazz));
110+
registerIfNotDefault(data, true, clazz, "unsafeAllocated", () -> delegate.registerUnsafeAllocated(condition, clazz));
111111

112112
MapCursor<String, Object> cursor = data.getEntries();
113113
while (cursor.advance()) {

0 commit comments

Comments
 (0)