src/share/classes/java/lang/Boolean.java

Print this page

        

*** 227,245 **** * If there is no property with the specified name, or if the specified * name is empty or null, then {@code false} is returned. * * @param name the system property name. * @return the {@code boolean} value of the system property. * @see java.lang.System#getProperty(java.lang.String) * @see java.lang.System#getProperty(java.lang.String, java.lang.String) */ public static boolean getBoolean(String name) { boolean result = false; try { result = toBoolean(System.getProperty(name)); ! } catch (IllegalArgumentException e) { ! } catch (NullPointerException e) { } return result; } /** --- 227,246 ---- * If there is no property with the specified name, or if the specified * name is empty or null, then {@code false} is returned. * * @param name the system property name. * @return the {@code boolean} value of the system property. + * @throws SecurityException for the same reasons as + * {@link System#getProperty(String) System.getProperty} * @see java.lang.System#getProperty(java.lang.String) * @see java.lang.System#getProperty(java.lang.String, java.lang.String) */ public static boolean getBoolean(String name) { boolean result = false; try { result = toBoolean(System.getProperty(name)); ! } catch (IllegalArgumentException | NullPointerException e) { } return result; } /**