You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by bu...@apache.org on 2003/07/29 16:17:47 UTC
DO NOT REPLY [Bug 21966] New: -
NullPointerException when calling getLexicalFacetValue() on XSSimpleTypeDefinition
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: xerces-j-dev@xml.apache.org
ReportedBy: peterjm@ca.ibm.com
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: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org