in src/main/java/org/apache/sling/commons/osgi/PropertiesUtil.java [103:116]
public static int toInteger(Object propValue, int defaultValue) {
propValue = toObject(propValue);
if (propValue instanceof Integer) {
return (Integer) propValue;
} else if (propValue != null) {
try {
return Integer.parseInt(String.valueOf(propValue));
} catch (NumberFormatException nfe) {
// don't care, fall through to default value
}
}
return defaultValue;
}