Bug 1127332 - [GSS] (6.3.1) Invalid boolean values are set to 'false' instead of null
Summary: [GSS] (6.3.1) Invalid boolean values are set to 'false' instead of null
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: XML Frameworks
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: CR1
: EAP 6.3.1
Assignee: Navin Surtani
QA Contact: Pavel Slavicek
Depends On: 1127329
Blocks: eap631-blockers, eap631-payload, eap63-cp01-blockers 1127327
TreeView+ depends on / blocked
Reported: 2014-08-06 16:42 UTC by Kyle Lape
Modified: 2018-12-06 17:38 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: Boolean parsing logic in JAXB does not conform to JAXB 2.2 spec, section B.3.8.1. Consequence: java.lang.Boolean fields are set to false instead of null when incoming xs:boolean values are invalid. Fix: Fix the parsing logic to conform to JAXB 2.2 spec, section B.3.8.1. Result: java.lang.Boolean values are consistently set to null when the incoming value is invalid.
Clone Of: 1127329
Last Closed: 2014-10-13 18:38:55 UTC
Type: Bug

Attachments (Terms of Use)

Description Kyle Lape 2014-08-06 16:42:05 UTC
There are certain illegal values of an xs:boolean that return false when they should return null, namely values that start with t and f. In addition, if the string literals "t" and "f" are passed in, this will cause an unmarshalling error:

Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 1
  at java.lang.AbstractStringBuilder.charAt(AbstractStringBuilder.java:203) [rt.jar:1.7.0_55]
  at java.lang.StringBuilder.charAt(StringBuilder.java:72) [rt.jar:1.7.0_55]
  at com.sun.xml.bind.DatatypeConverterImpl._parseBoolean(DatatypeConverterImpl.java:260)

Comment 1 Kyle Lape 2014-08-06 16:44:27 UTC
Upstream Jira: https://java.net/jira/browse/JAXB-1019

Comment 3 Jan Blizňák 2014-09-01 17:15:26 UTC
Verified on 6.3.1.CP.CR1 

Reproducers from customer case were used.

Note You need to log in before you can comment on or make changes to this bug.