File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
core/src/main/java/org/bouncycastle/util Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,32 @@ public static boolean isOverrideSet(String propertyName)
4848 }
4949 }
5050
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+
5177 /**
5278 * Return whether a particular override has been set to false.
5379 *
You can’t perform that action at this time.
0 commit comments