private static final boolean checkFloat ( String s ) { try { //Coverity[FB.DLS_DEAD_LOCAL_STORE]= float val = Float . parseFloat ( s ) ; if ( DebugValueChecking ) { DAPNode . log . debug ( "Attribute.checkFloat() - string: '" + s + "' value: " + val ) ; } return true ; } catch ( NumberFormatException e ) { if ( s . equalsIgnoreCase ( "nan" ) || s . equalsIgnoreCase ( "inf" ) ) return true ; return false ; } }
Check if string is a valid Float32 .