* @param defValue
* @return
*/
public static <T extends Enum<T>> T getEnumSysProp(String propName, T defValue) {
if (null == propName)
throw new SqlJetError("Undefined property name");
if (null == defValue)
throw new SqlJetError("Undefined default value");
try {
return Enum.valueOf(defValue.getDeclaringClass(), System.getProperty(propName, defValue.toString()));
} catch (Throwable t) {
throw new SqlJetError("Error while get int value for property " + propName, t);
}
}