Changeset 5769
- Timestamp:
- Sep 29, 2011, 10:44:38 AM (11 years ago)
- Location:
- trunk/src/core/net/sf/basedb/util
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/core/net/sf/basedb/util/jep/FunctionSafeJep.java
r5689 r5769 31 31 import org.nfunk.jep.FunctionTable; 32 32 import org.nfunk.jep.JEP; 33 import org.nfunk.jep.Node; 33 34 import org.nfunk.jep.ParseException; 34 35 import org.nfunk.jep.Token; … … 77 78 this.errorList.add(error); 78 79 } 79 80 81 /** 82 Override the superclass method so that exceptions are passed on 83 instead of swallowed. 84 @since 3.0 85 */ 86 @Override 87 public Object getValueAsObject() 88 { 89 Node topNode = getTopNode(); 90 if (topNode == null || hasError()) return null; 91 try 92 { 93 return this.ev.getValue(topNode, this.symTab); 94 } 95 catch (ParseException ex) 96 { 97 throw new RuntimeException(ex); 98 } 99 } 100 80 101 /** 81 102 Function table implementation that pretends that all possible functions -
trunk/src/core/net/sf/basedb/util/parser/ColFunction.java
r4515 r5769 170 170 { 171 171 pos.setIndex(0); 172 d = numberFormat.parse(value, pos).doubleValue();173 if ( pos.getIndex() < value.length())172 Number n = numberFormat.parse(value, pos); 173 if (n == null || pos.getIndex() < value.length()) 174 174 { 175 175 stack.push(value); 176 176 return; 177 177 } 178 d = n.doubleValue(); 178 179 } 179 180 }
Note: See TracChangeset
for help on using the changeset viewer.