diff --git a/smalivm/src/main/java/org/cf/smalivm/configuration/Configuration.java b/smalivm/src/main/java/org/cf/smalivm/configuration/Configuration.java index 6af9bf1d9..fe67788bc 100644 --- a/smalivm/src/main/java/org/cf/smalivm/configuration/Configuration.java +++ b/smalivm/src/main/java/org/cf/smalivm/configuration/Configuration.java @@ -51,6 +51,10 @@ public boolean isImmutable(String className) { return immutableClasses.contains(className); } + public boolean isMutable(String className) { + return !isImmutable(className); + } + /** * Safe classes are Java API classes which are safe to instantiate, load, and statically * initialize. Safe methods are methods of Java classes which are safe to execute. Only classes @@ -76,7 +80,7 @@ public boolean isSafe(String typeSignature) { } public boolean isUnsafeMethod(String methodDescriptor) { - return !unsafeMethods.contains(methodDescriptor); + return unsafeMethods.contains(methodDescriptor); } }