(String property, Boolean def)
| 63 | } |
| 64 | |
| 65 | public boolean getBooleanProperty(String property, Boolean def) { |
| 66 | String value = getProperty(property, def.toString()); |
| 67 | try { |
| 68 | int x = Integer.valueOf(value); |
| 69 | if (x > 0) { |
| 70 | return true; |
| 71 | } |
| 72 | } catch (NumberFormatException ignore) { |
| 73 | } |
| 74 | return (value.matches("^([tT][rR][uU][eE]|1)$")); |
| 75 | } |
| 76 | |
| 77 | public int getIntegerProperty(String property, int def) { |
| 78 | return new Integer(getProperty(property, Integer.toString(def))); |
no test coverage detected