sandygao 2002/09/18 08:14:18 Modified: java/src/org/apache/xerces/impl/dv/xs XSSimpleTypeDecl.java Log: Check whether fEnumeration and fPattern are null before accessing them, to avoid NPE's. Revision Changes Path 1.18 +6 -1 xml-xerces/java/src/org/apache/xerces/impl/dv/xs/XSSimpleTypeDecl.java Index: XSSimpleTypeDecl.java =================================================================== RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/dv/xs/XSSimpleTypeDecl.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- XSSimpleTypeDecl.java 1 Aug 2002 13:54:32 -0000 1.17 +++ XSSimpleTypeDecl.java 18 Sep 2002 15:14:18 -0000 1.18 @@ -1697,6 +1697,9 @@ } public StringList getLexicalEnumerations() { + if (fEnumeration == null) + return null; + // REVISIT: fEnumeration should be of type StringListImpl int size = fEnumeration.size(); String[] strs = new String[size]; @@ -1706,6 +1709,8 @@ } public StringList getLexicalPatterns() { + if (fPattern == null) + return null; // REVISIT: fPattern should be of type StringListImpl int size = fPattern.size();
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]