Skip to content

javax.xml.bind.DatatypeConverter.parseBoolean("10") returns true instead of false or an Exception  #240

@Tomas-Kraus

Description

@Tomas-Kraus

javax.xml.bind.DatatypeConverter.parseBoolean("10") returns true instead of false or an Exception.

The method will return true for any String that starts with "1" like "11" or "1A".

I would expect the result to be false or throw an IllegalArgumentException as the Javadoc seems to indicate.

Environment

java version "1.6.0_31"
Java(TM) SE Runtime Environment (build 1.6.0_31-b05)
Java HotSpot(TM) 64-Bit Server VM (build 20.6-b01, mixed mode)

Windows 7 64-bit

Affected Versions

[2.2.5]

Metadata

Metadata

Labels

MajorPrioritybugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions