Author: mrglavas
Date: Mon Nov 17 20:43:03 2008
New Revision: 718480

URL: http://svn.apache.org/viewvc?rev=718480&view=rev
Log:
Fixing a bug. ItemPSVI is supposed return "an empty StringList if no 
errors occurred during the validation attempt". It was returning null.

Modified:
    xerces/java/trunk/src/org/apache/xerces/impl/xs/AttributePSVImpl.java
    xerces/java/trunk/src/org/apache/xerces/impl/xs/ElementPSVImpl.java

Modified: xerces/java/trunk/src/org/apache/xerces/impl/xs/AttributePSVImpl.java
URL: 
http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/impl/xs/AttributePSVImpl.java?rev=718480&r1=718479&r2=718480&view=diff
==============================================================================
--- xerces/java/trunk/src/org/apache/xerces/impl/xs/AttributePSVImpl.java 
(original)
+++ xerces/java/trunk/src/org/apache/xerces/impl/xs/AttributePSVImpl.java Mon 
Nov 17 20:43:03 2008
@@ -137,8 +137,9 @@
      * @return list of error codes
      */
     public StringList getErrorCodes() {
-        if (fErrorCodes == null)
-            return null;
+        if (fErrorCodes == null) {
+            return StringListImpl.EMPTY_LIST;
+        }
         return new StringListImpl(fErrorCodes, fErrorCodes.length);
     }
 

Modified: xerces/java/trunk/src/org/apache/xerces/impl/xs/ElementPSVImpl.java
URL: 
http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/impl/xs/ElementPSVImpl.java?rev=718480&r1=718479&r2=718480&view=diff
==============================================================================
--- xerces/java/trunk/src/org/apache/xerces/impl/xs/ElementPSVImpl.java 
(original)
+++ xerces/java/trunk/src/org/apache/xerces/impl/xs/ElementPSVImpl.java Mon Nov 
17 20:43:03 2008
@@ -157,8 +157,9 @@
      * @return Array of error codes
      */
     public StringList getErrorCodes() {
-        if (fErrorCodes == null)
-            return null;
+        if (fErrorCodes == null) {
+            return StringListImpl.EMPTY_LIST;
+        }
         return new StringListImpl(fErrorCodes, fErrorCodes.length);
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to