javax.xml.bind.DatatypeConverter.parseBoolean incorrect · Issue #608 · javaee/jaxb-v2 (original) (raw)
This repository was archived by the owner on Feb 5, 2019. It is now read-only.
This repository was archived by the owner on Feb 5, 2019. It is now read-only.
Description
(jaxb-ri-20090206)
javadoc for said method claims to accept "A string containing lexical
representation of xsd:boolean" and to throw "IllegalArgumentException - if
string parameter does not conform to lexical value space defined in XML Schema
Part 2: Datatypes for xsd:boolean."
IllegalArgumentException is never thrown.
method accepts /\s*[1t]./ as true and /\s[0f].*/ as false, whereas XML Schema
Part 2, 3.2.2 boolean rules that the lexical representations are
{true, false, 1, 0}
Also, parseBoolean( "" ) runs into a StringIndexOutOfBoundsException.
Environment
Operating System: All
Platform: All