You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by mr...@apache.org on 2008/09/27 20:12:36 UTC

svn commit: r699706 - in /xerces/java/trunk/src/org/apache/xerces/jaxp/validation: ValidatorHandlerImpl.java ValidatorImpl.java

Author: mrglavas
Date: Sat Sep 27 11:12:36 2008
New Revision: 699706

URL: http://svn.apache.org/viewvc?rev=699706&view=rev
Log:
Fixing several instances of the same bug. We were throwing a 
SAXNotRecognizedException where a SAXNotSupportedException 
should be thrown.

Modified:
    xerces/java/trunk/src/org/apache/xerces/jaxp/validation/ValidatorHandlerImpl.java
    xerces/java/trunk/src/org/apache/xerces/jaxp/validation/ValidatorImpl.java

Modified: xerces/java/trunk/src/org/apache/xerces/jaxp/validation/ValidatorHandlerImpl.java
URL: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/jaxp/validation/ValidatorHandlerImpl.java?rev=699706&r1=699705&r2=699706&view=diff
==============================================================================
--- xerces/java/trunk/src/org/apache/xerces/jaxp/validation/ValidatorHandlerImpl.java (original)
+++ xerces/java/trunk/src/org/apache/xerces/jaxp/validation/ValidatorHandlerImpl.java Sat Sep 27 11:12:36 2008
@@ -244,11 +244,16 @@
         }
         catch (XMLConfigurationException e) {
             final String identifier = e.getIdentifier();
-            final String key = e.getType() == XMLConfigurationException.NOT_RECOGNIZED ?
-                    "feature-not-recognized" : "feature-not-supported";
-            throw new SAXNotRecognizedException(
-                    SAXMessageFormatter.formatMessage(Locale.getDefault(), 
-                    key, new Object [] {identifier}));
+            if (e.getType() == XMLConfigurationException.NOT_RECOGNIZED) {
+                throw new SAXNotRecognizedException(
+                        SAXMessageFormatter.formatMessage(Locale.getDefault(), 
+                        "feature-not-recognized", new Object [] {identifier}));
+            }
+            else {
+                throw new SAXNotSupportedException(
+                        SAXMessageFormatter.formatMessage(Locale.getDefault(), 
+                        "feature-not-supported", new Object [] {identifier}));
+            }
         }
     }
     
@@ -263,11 +268,16 @@
         }
         catch (XMLConfigurationException e) {
             final String identifier = e.getIdentifier();
-            final String key = e.getType() == XMLConfigurationException.NOT_RECOGNIZED ?
-                    "feature-not-recognized" : "feature-not-supported";
-            throw new SAXNotRecognizedException(
-                    SAXMessageFormatter.formatMessage(Locale.getDefault(), 
-                    key, new Object [] {identifier}));
+            if (e.getType() == XMLConfigurationException.NOT_RECOGNIZED) {
+                throw new SAXNotRecognizedException(
+                        SAXMessageFormatter.formatMessage(Locale.getDefault(), 
+                        "feature-not-recognized", new Object [] {identifier}));
+            }
+            else {
+                throw new SAXNotSupportedException(
+                        SAXMessageFormatter.formatMessage(Locale.getDefault(), 
+                        "feature-not-supported", new Object [] {identifier}));
+            }
         }
     }
     
@@ -282,11 +292,16 @@
         }
         catch (XMLConfigurationException e) {
             final String identifier = e.getIdentifier();
-            final String key = e.getType() == XMLConfigurationException.NOT_RECOGNIZED ?
-                    "property-not-recognized" : "property-not-supported";
-            throw new SAXNotRecognizedException(
-                    SAXMessageFormatter.formatMessage(Locale.getDefault(), 
-                    key, new Object [] {identifier}));
+            if (e.getType() == XMLConfigurationException.NOT_RECOGNIZED) {
+                throw new SAXNotRecognizedException(
+                        SAXMessageFormatter.formatMessage(Locale.getDefault(), 
+                        "property-not-recognized", new Object [] {identifier}));
+            }
+            else {
+                throw new SAXNotSupportedException(
+                        SAXMessageFormatter.formatMessage(Locale.getDefault(), 
+                        "property-not-supported", new Object [] {identifier}));
+            }
         }
     }
     
@@ -301,11 +316,16 @@
         }
         catch (XMLConfigurationException e) {
             final String identifier = e.getIdentifier();
-            final String key = e.getType() == XMLConfigurationException.NOT_RECOGNIZED ?
-                    "property-not-recognized" : "property-not-supported";
-            throw new SAXNotRecognizedException(
-                    SAXMessageFormatter.formatMessage(Locale.getDefault(), 
-                    key, new Object [] {identifier}));
+            if (e.getType() == XMLConfigurationException.NOT_RECOGNIZED) {
+                throw new SAXNotRecognizedException(
+                        SAXMessageFormatter.formatMessage(Locale.getDefault(), 
+                        "property-not-recognized", new Object [] {identifier}));
+            }
+            else {
+                throw new SAXNotSupportedException(
+                        SAXMessageFormatter.formatMessage(Locale.getDefault(), 
+                        "property-not-supported", new Object [] {identifier}));
+            }
         }
     }
     

Modified: xerces/java/trunk/src/org/apache/xerces/jaxp/validation/ValidatorImpl.java
URL: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/jaxp/validation/ValidatorImpl.java?rev=699706&r1=699705&r2=699706&view=diff
==============================================================================
--- xerces/java/trunk/src/org/apache/xerces/jaxp/validation/ValidatorImpl.java (original)
+++ xerces/java/trunk/src/org/apache/xerces/jaxp/validation/ValidatorImpl.java Sat Sep 27 11:12:36 2008
@@ -183,11 +183,16 @@
         }
         catch (XMLConfigurationException e) {
             final String identifier = e.getIdentifier();
-            final String key = e.getType() == XMLConfigurationException.NOT_RECOGNIZED ?
-                    "feature-not-recognized" : "feature-not-supported";
-            throw new SAXNotRecognizedException(
-                    SAXMessageFormatter.formatMessage(Locale.getDefault(), 
-                    key, new Object [] {identifier}));
+            if (e.getType() == XMLConfigurationException.NOT_RECOGNIZED) {
+                throw new SAXNotRecognizedException(
+                        SAXMessageFormatter.formatMessage(Locale.getDefault(), 
+                        "feature-not-recognized", new Object [] {identifier}));
+            }
+            else {
+                throw new SAXNotSupportedException(
+                        SAXMessageFormatter.formatMessage(Locale.getDefault(), 
+                        "feature-not-supported", new Object [] {identifier}));
+            }
         }
     }
     
@@ -216,11 +221,16 @@
         }
         catch (XMLConfigurationException e) {
             final String identifier = e.getIdentifier();
-            final String key = e.getType() == XMLConfigurationException.NOT_RECOGNIZED ?
-                    "feature-not-recognized" : "feature-not-supported";
-            throw new SAXNotRecognizedException(
-                    SAXMessageFormatter.formatMessage(Locale.getDefault(), 
-                    key, new Object [] {identifier}));
+            if (e.getType() == XMLConfigurationException.NOT_RECOGNIZED) {
+                throw new SAXNotRecognizedException(
+                        SAXMessageFormatter.formatMessage(Locale.getDefault(), 
+                        "feature-not-recognized", new Object [] {identifier}));
+            }
+            else {
+                throw new SAXNotSupportedException(
+                        SAXMessageFormatter.formatMessage(Locale.getDefault(), 
+                        "feature-not-supported", new Object [] {identifier}));
+            }
         }
         fConfigurationChanged = true;
     }
@@ -240,11 +250,16 @@
         }
         catch (XMLConfigurationException e) {
             final String identifier = e.getIdentifier();
-            final String key = e.getType() == XMLConfigurationException.NOT_RECOGNIZED ?
-                    "property-not-recognized" : "property-not-supported";
-            throw new SAXNotRecognizedException(
-                    SAXMessageFormatter.formatMessage(Locale.getDefault(), 
-                    key, new Object [] {identifier}));
+            if (e.getType() == XMLConfigurationException.NOT_RECOGNIZED) {
+                throw new SAXNotRecognizedException(
+                        SAXMessageFormatter.formatMessage(Locale.getDefault(), 
+                        "property-not-recognized", new Object [] {identifier}));
+            }
+            else {
+                throw new SAXNotSupportedException(
+                        SAXMessageFormatter.formatMessage(Locale.getDefault(), 
+                        "property-not-supported", new Object [] {identifier}));
+            }
         }
     }
     
@@ -264,11 +279,16 @@
         }
         catch (XMLConfigurationException e) {
             final String identifier = e.getIdentifier();
-            final String key = e.getType() == XMLConfigurationException.NOT_RECOGNIZED ?
-                    "property-not-recognized" : "property-not-supported";
-            throw new SAXNotRecognizedException(
-                    SAXMessageFormatter.formatMessage(Locale.getDefault(), 
-                    key, new Object [] {identifier}));
+            if (e.getType() == XMLConfigurationException.NOT_RECOGNIZED) {
+                throw new SAXNotRecognizedException(
+                        SAXMessageFormatter.formatMessage(Locale.getDefault(), 
+                        "property-not-recognized", new Object [] {identifier}));
+            }
+            else {
+                throw new SAXNotSupportedException(
+                        SAXMessageFormatter.formatMessage(Locale.getDefault(), 
+                        "property-not-supported", new Object [] {identifier}));
+            }
         }
         fConfigurationChanged = true;
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org