Skip to content

Commit 5adb896

Browse files
committed
Update according to code review
1 parent 04ab491 commit 5adb896

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

closed/src/java.base/share/classes/openj9/internal/security/RestrictedSecurity.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
import java.util.stream.Collectors;
5050
import java.util.stream.Stream;
5151

52+
import compiler.lib.ir_framework.driver.irmatching.irrule.constraint.Constraint;
5253
import sun.security.util.Debug;
5354

5455
/**
@@ -345,9 +346,10 @@ private static void getProfileID(Properties props) {
345346
}
346347
String defaultMatch = null;
347348
boolean profileExists = false;
349+
String profilePrefix = potentialProfileID + '.';
348350
for (Object keyObject : props.keySet()) {
349351
if (keyObject instanceof String key) {
350-
if (key.startsWith(potentialProfileID + '.')) {
352+
if (key.startsWith(profilePrefix)) {
351353
profileExists = true;
352354
if (key.endsWith(".desc.default")) {
353355
// Check if property is set to true.

0 commit comments

Comments
 (0)