Off by one error in GML constraints checking
--------------------------------------------
Key: GEOT-1803
URL: http://jira.codehaus.org/browse/GEOT-1803
Project: GeoTools
Issue Type: Bug
Components: data gml
Affects Versions: 2.2.2
Reporter: Jesse Eichar
Assignee: Jesse Eichar
Priority: Minor
Fix For: 2.2.3
int decimals = val.length() - val.indexOf(".");
int maxDec = Integer.parseInt(constraints[i].getValue());
if (decimals > maxDec) {
throw new SAXException("Too many decimal places");
}
is wrong should be:
int decimals = val.length() - 1 - val.indexOf(".");
int maxDec = Integer.parseInt(constraints[i].getValue());
if (decimals > maxDec) {
throw new SAXException("Too many decimal places");
}
This is lines:
273 in SimpleTypeGT.java
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel