src/share/classes/java/util/PropertyPermission.java
Print this page
@@ -244,11 +244,12 @@
if (actions == null) {
return mask;
}
- // Check against use of constants (used heavily within the JDK)
+ // Use object identity comparison against known-interned strings for
+ // performance benefit (these values are used heavily within the JDK).
if (actions == SecurityConstants.PROPERTY_READ_ACTION) {
return READ;
} if (actions == SecurityConstants.PROPERTY_WRITE_ACTION) {
return WRITE;
} else if (actions == SecurityConstants.PROPERTY_RW_ACTION) {