Revision 2889
org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.lib/src/main/java/org/gvsig/tools/dataTypes/impl/coercion/CoerceToDecimal.java | ||
---|---|---|
111 | 111 |
// modifica el existente. |
112 | 112 |
num = num.setScale(theContext.scale(), theContext.roundMode()); |
113 | 113 |
} |
114 |
if (theContext.hasPrecision() && num.precision() > theContext.precision()) {
|
|
114 |
if (theContext.hasPrecision() && num.unscaledValue().toString().length() > theContext.precision()) {
|
|
115 | 115 |
throw new ArithmeticException("Overflow"); |
116 | 116 |
} |
117 | 117 |
return num; |
Also available in: Unified diff