We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d2ac0bc commit 2f63dc8Copy full SHA for 2f63dc8
1 file changed
core/src/main/java/org/bouncycastle/util/Properties.java
@@ -48,6 +48,32 @@ public static boolean isOverrideSet(String propertyName)
48
}
49
50
51
+ /**
52
+ * Return whether a particular override has been set to true.
53
+ *
54
+ * @param propertyName the property name for the override.
55
+ * @return true if the property is set to "true", false otherwise.
56
+ */
57
+ public static boolean isOverrideSet(String propertyName, boolean defIsTrue)
58
+ {
59
+ try
60
61
+ String value = getPropertyValue(propertyName);
62
+ if (value == null)
63
64
+ return defIsTrue;
65
+ }
66
+ else
67
68
+ return isSetTrue(value);
69
70
71
+ catch (AccessControlException e)
72
73
+ return false;
74
75
76
+
77
/**
78
* Return whether a particular override has been set to false.
79
*
0 commit comments