DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21966>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21966 NullPointerException when calling getLexicalFacetValue() on XSSimpleTypeDefinition Summary: NullPointerException when calling getLexicalFacetValue() on XSSimpleTypeDefinition Product: Xerces2-J Version: 2.4.0 Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: XML Schema datatypes AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] My problem comes when tyring to call getLexicalFacetValue() using facets that are not associated with the given type. To illustrate I will use the example above, I would expect calling getLexicalFacetValue(FACET_MAXINCLUSIVE) on a 'decimal' type object to return null as stated in the Javadoc but instead it throws a null pointer exception. Below is the code I'm using and the stack trace that I get: System.out.println("::::::::::::: TYPE NAME: " + typeDef.getName()); // Make sure that the value can be turned into a decimal. Double.parseDouble(attributeValue.toString()); System.out.println("^^^^ TODO: Add validation logic"); String maxInclusive = typeDef.getLexicalFacetValue(XSSimpleTypeDefinition.FACET_MAXINCLUSIVE); if(maxInclusive != null) { System.out.println("Max. inclusive facet found!!!"); } else { System.out.println("Max. inclusive facet NOT found!!!"); } java.lang.NullPointerException at org.apache.xerces.impl.dv.xs.XSSimpleTypeDecl.getLexicalFacetValue(Unknown Source) [...] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
