Update of /cvsroot/sunxacml/sunxacml/com/sun/xacml/attr
In directory sc8-pr-cvs1:/tmp/cvs-serv10185/com/sun/xacml/attr
Modified Files:
StringAttribute.java
Log Message:
fixed code to handle empty AttributeValues
Index: StringAttribute.java
===================================================================
RCS file: /cvsroot/sunxacml/sunxacml/com/sun/xacml/attr/StringAttribute.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** StringAttribute.java 13 Feb 2003 22:19:10 -0000 1.1.1.1
--- StringAttribute.java 29 Aug 2003 18:51:27 -0000 1.2
***************
*** 121,125 ****
*/
public static StringAttribute getInstance(Node root) {
! return getInstance(root.getFirstChild().getNodeValue());
}
--- 121,132 ----
*/
public static StringAttribute getInstance(Node root) {
! Node node = root.getFirstChild();
!
! // Strings are allowed to have an empty AttributeValue element and are
! // just treated as empty strings...we have to handle this case
! if (node == null)
! return new StringAttribute("");
! else
! return getInstance(node.getNodeValue());
}
|