212 |
* |
* |
213 |
* @param name the property name to look up |
* @param name the property name to look up |
214 |
* @return true if the property resulted in "true" |
* @return true if the property resulted in "true" |
215 |
|
* @throws SecurityException if accessing the system property is forbidden |
216 |
* @see System#getProperty(String) |
* @see System#getProperty(String) |
217 |
*/ |
*/ |
218 |
public static boolean getBoolean(String name) |
public static boolean getBoolean(String name) |
219 |
{ |
{ |
220 |
String val = System.getProperty(name); |
if (name == null || "".equals(name)) |
221 |
return "true".equalsIgnoreCase(val); |
return false; |
222 |
|
return "true".equalsIgnoreCase(System.getProperty(name)); |
223 |
} |
} |
224 |
} |
} |