public static long getLong ( String key , long valueIfNullOrNotParseable ) { String value = System . getProperty ( key ) ; if ( Strings . isNullOrEmpty ( value ) ) { return valueIfNullOrNotParseable ; } try { return Long . parseLong ( value ) ; } catch ( NumberFormatException e ) { return valueIfNullOrNotParseable ; } }
Gets a system property long or a replacement value if the property is null or blank or not parseable