src/java.base/share/classes/sun/security/ssl/Debug.java

Print this page

        

*** 199,208 **** --- 199,226 ---- throw new RuntimeException("Value of " + propName + " must either be 'true' or 'false'"); } } + /** + * Return the value of the integer System property propName. + * + * Note use of doPrivileged(). Do make accessible to applications. + */ + static int getIntegerProperty(String propName, int defaultValue) { + String i = GetPropertyAction.privilegedGetProperty(propName); + if (i != null) { + try { + return Integer.parseInt(i); + } catch(NumberFormatException e) { + throw new RuntimeException("Value of " + propName + + " must be a valid integer"); + } + } + return defaultValue; + } + static String toString(byte[] b) { return sun.security.util.Debug.toString(b); } static void printHex(String prefix, byte[] bytes) {