You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by je...@locus.apache.org on 2000/09/15 02:49:26 UTC
cvs commit: xml-xerces/java/src/org/apache/xerces/validators/datatype DecimalDatatypeValidator.java
jeffreyr 00/09/14 17:49:26
Modified: java/src/org/apache/xerces/validators/datatype
DecimalDatatypeValidator.java
Log:
Fixed message problem reported by Doug Smith 09/14/2000
Revision Changes Path
1.13 +5 -4 xml-xerces/java/src/org/apache/xerces/validators/datatype/DecimalDatatypeValidator.java
Index: DecimalDatatypeValidator.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/validators/datatype/DecimalDatatypeValidator.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- DecimalDatatypeValidator.java 2000/08/02 02:47:55 1.12
+++ DecimalDatatypeValidator.java 2000/09/15 00:49:26 1.13
@@ -73,7 +73,7 @@
*
* @author Ted Leung
* @author Jeffrey Rodriguez
- * @version $Id: DecimalDatatypeValidator.java,v 1.12 2000/08/02 02:47:55 jeffreyr Exp $
+ * @version $Id: DecimalDatatypeValidator.java,v 1.13 2000/09/15 00:49:26 jeffreyr Exp $
*/
public class DecimalDatatypeValidator extends AbstractDatatypeValidator {
@@ -311,11 +311,12 @@
if ( isPrecisionDefined == true ) {
int precision = d.movePointRight(d.scale()).toString().length() -
((d.signum() < 0) ? 1 : 0); // account for minus sign
+
if (precision > fPrecision)
throw new InvalidDatatypeValueException(
- getErrorString(DatatypeMessageProvider.PrecisionExceeded,
- DatatypeMessageProvider.MSG_NONE,
- new Object[] {content} ));
+ getErrorString(DatatypeMessageProvider.PrecisionExceeded,
+ DatatypeMessageProvider.MSG_NONE,
+ new Object[] { "'" + content + "'" , "'" + precision + "'" } ));
}
boundsCheck(d);
if ( fEnumDecimal != null )