Commit 5d812e89 authored by Matt Tucker's avatar Matt Tucker Committed by matt

Added method to get a long property.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@4701 b35dd754-fafc-0310-a699-88a17e54d16e
parent ee01aff3
......@@ -554,6 +554,28 @@ public class JiveGlobals {
return defaultValue;
}
/**
* Returns a long value Jive property. If the specified property doesn't exist, the
* <tt>defaultValue</tt> will be returned.
*
* @param name the name of the property to return.
* @param defaultValue value returned if the property doesn't exist or was not
* a number.
* @return the property value specified by name or <tt>defaultValue</tt>.
*/
public static long getLongProperty(String name, long defaultValue) {
String value = getProperty(name);
if (value != null) {
try {
return Long.parseLong(value);
}
catch (NumberFormatException nfe) {
// Ignore.
}
}
return defaultValue;
}
/**
* Returns a boolean value Jive property.
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment