}
return null;
}
+
+ /**
+ * get and parse a property as an integer. send any parsing problems to System.err
+ * @param property
+ * @return null or Integer
+ */
+ public static Integer getIntegerProperty(String property)
+ {
+ String val=getProperty(property);
+ if (val!=null && (val=val.trim()).length()>0)
+ {
+ try {
+ return Integer.valueOf(val);
+ } catch (NumberFormatException x)
+ {
+ System.err.println("Invalid integer in property '"+property+"' (value was '"+val+"')");
+ }
+ }
+ return null;
+ }
}