Share

Sun's XACML Implementation

Tracker: Bugs

5 AbstractPolicy constructor NPE when Description empty - ID: 1600902
Last Update: Comment added ( sethp )

If a given schema-valid policy document contains an empty description
element ([Description][/Description] or [Description/]), AbstractPolicy
throws a NullPointerException in its constructor.

According to the XACML policy schema provided by OASIS, the datatype of the
Description element is xs:string. And according to
http://www.w3.org/TR/xmlschema-2/ an empty xs:string is a valid xs:string.

So either the schema should be updated to disallow empty strings, or the
parsing should account for this case.

The attached AbstractPolicy.java contains a small modification to the 1.2
source release's code (around line 220) which takes the latter route: it
checks for a null child and treats it the same as if the Description
element had not been specified at all in the policy document.


Chris Wilper ( cwilper ) - 2006-11-22 03:23

5

Closed

Fixed

Nobody/Anonymous

None

None

Public


Comment ( 1 )




Date: 2006-11-28 14:47
Sender: sethpProject Admin


Hi Chris. Thanks for catching this, and tracking down the evidence that
this is indeed a bug. I have committed a fix in the latest CVS tree. Please
let me know if things are now working for you correctly.


seth


Log in to comment.

Attached File ( 1 )

Filename Description Download
AbstractPolicy.java Patched AbstractPolicy.java that doesn't throw NPE when Description is empty Download

Changes ( 4 )

Field Old Value Date By
status_id Open 2006-11-28 14:47 sethp
resolution_id None 2006-11-28 14:47 sethp
close_date - 2006-11-28 14:47 sethp
File Added 203914: AbstractPolicy.java 2006-11-22 03:23 cwilper