Bug 1127332

Summary: [GSS] (6.3.1) Invalid boolean values are set to 'false' instead of null
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Kyle Lape <klape>
Component: XML FrameworksAssignee: Navin Surtani <nsurtani>
Status: CLOSED CURRENTRELEASE QA Contact: Pavel Slavicek <pslavice>
Severity: unspecified Docs Contact: Tom WELLS <twells>
Priority: unspecified    
Version: 6.3.0CC: bbaranow, bmaxwell, cdewolf, jason.greene, jbliznak, lcarlon, myarboro, pslavice, twells
Target Milestone: CR1Keywords: Triaged
Target Release: EAP 6.3.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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.
Story Points: ---
Clone Of: 1127329 Environment:
Last Closed: 2014-10-13 18:38:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1127329    
Bug Blocks: 1102082, 1127327    

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.