From: Max M. <max...@us...> - 2003-06-25 16:53:06
|
Update of /cvsroot/wonder/Wonder/Common/Frameworks/ERExtensions/Sources/er/extensions In directory sc8-pr-cvs1:/tmp/cvs-serv799/Sources/er/extensions Modified Files: ERXProperties.java Log Message: Adding intForKeyWithDefault Index: ERXProperties.java =================================================================== RCS file: /cvsroot/wonder/Wonder/Common/Frameworks/ERExtensions/Sources/er/extensions/ERXProperties.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** ERXProperties.java 18 Apr 2003 21:21:42 -0000 1.22 --- ERXProperties.java 25 Jun 2003 16:53:03 -0000 1.23 *************** *** 231,237 **** */ public static int intForKey(String s) { ! return ERXValueUtilities.intValueWithDefault(System.getProperty(s), 0); } /** * Returning an string for a given system --- 231,248 ---- */ public static int intForKey(String s) { ! return intForKeyWithDefault(s, 0); } + /** + * Cover method for returning an int for a + * given system property with a default value. + * @param s system property + * @param defaultValue default value + * @return int value of the system property or the default value + */ + public static int intForKeyWithDefault(String s, int defaultValue) { + return ERXValueUtilities.intValueWithDefault(System.getProperty(s), defaultValue); + } + /** * Returning an string for a given system |