public static double parseDoubleString(String st,TExecutionContext context){
  double ret=0;
  Matcher m=DOUBLE_PATTERN.matcher(st);
  if (m.lookingAt()) {
    String truncated=st.substring(0,m.end());
    if (!truncated.equals(st)) {
      context.reportTruncate(st,truncated);
    }
    try {
      ret=Double.parseDouble(truncated);
    }
 catch (    NumberFormatException e) {
      context.reportBadValue(e.getMessage());
    }
  }
 else   context.reportBadValue(st);
  return ret;
}

public static double parseDoubleString ( String st , TExecutionContext context ) { double ret = 0 ; Matcher m = DOUBLE_PATTERN . matcher ( st ) ; if ( m . lookingAt ( ) ) { String truncated = st . substring ( 0 , m . end ( ) ) ; if ( ! truncated . equals ( st ) ) { context . reportTruncate ( st , truncated ) ; } try { ret = Double . parseDouble ( truncated ) ; } catch ( NumberFormatException e ) { context . reportBadValue ( e . getMessage ( ) ) ; } } else context . reportBadValue ( st ) ; return ret ; }
parse the st for a double value mysql compat in that illegal digits will be truncated and won ' t cause numberformatexception
