Skip to content

Commit e91ad6c

Browse files
committed
svm: further adopt "JDK-8364187: Make getClassAccessFlagsRaw non-native"
1 parent 9a618cb commit e91ad6c

File tree

1 file changed

+7
-6
lines changed
  • substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/hub

1 file changed

+7
-6
lines changed

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/hub/DynamicHub.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,20 +1042,21 @@ public int getModifiers() {
10421042
@Substitute
10431043
int getClassFileAccessFlags() {
10441044
if (ImageLayerBuildingSupport.buildingImageLayer()) {
1045+
/*
1046+
* Currently, layered images do not use the Class#classFileAccessFlags. This will be
1047+
* addressed by GR-68631.
1048+
*/
10451049
int classAccessFlags = 0;
1046-
for (var reflectionMetadata : LayeredReflectionMetadataSingleton.singletons()) {
1047-
classAccessFlags |= getClassAccessFlags(reflectionMetadata.getReflectionMetadata(this));
1050+
for (var reflectionMetadataSingleton : LayeredReflectionMetadataSingleton.singletons()) {
1051+
ReflectionMetadata reflectionMetadata = reflectionMetadataSingleton.getReflectionMetadata(this);
1052+
classAccessFlags |= reflectionMetadata != null ? (reflectionMetadata.classFlags & CLASS_ACCESS_FLAGS_MASK) : companion.modifiers;
10481053
}
10491054
return classAccessFlags;
10501055
} else {
10511056
return companion.classFileAccessFlags;
10521057
}
10531058
}
10541059

1055-
private int getClassAccessFlags(ReflectionMetadata reflectionMetadata) {
1056-
return reflectionMetadata != null ? (reflectionMetadata.classFlags & CLASS_ACCESS_FLAGS_MASK) : companion.modifiers;
1057-
}
1058-
10591060
@Substitute
10601061
private DynamicHub getComponentType() {
10611062
return componentType;

0 commit comments

Comments
 (0)