db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mad...@apache.org
Subject svn commit: r545414 - in /db/jdo/trunk: api2-legacy/src/java/javax/jdo/JDOHelper.java api2/src/java/javax/jdo/JDOHelper.java
Date Fri, 08 Jun 2007 05:14:59 GMT
Author: madams
Date: Thu Jun  7 22:14:58 2007
New Revision: 545414

URL: http://svn.apache.org/viewvc?view=rev&rev=545414
Log:
JDO-478

Modified:
    db/jdo/trunk/api2-legacy/src/java/javax/jdo/JDOHelper.java
    db/jdo/trunk/api2/src/java/javax/jdo/JDOHelper.java

Modified: db/jdo/trunk/api2-legacy/src/java/javax/jdo/JDOHelper.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2-legacy/src/java/javax/jdo/JDOHelper.java?view=diff&rev=545414&r1=545413&r2=545414
==============================================================================
--- db/jdo/trunk/api2-legacy/src/java/javax/jdo/JDOHelper.java (original)
+++ db/jdo/trunk/api2-legacy/src/java/javax/jdo/JDOHelper.java Thu Jun  7 22:14:58 2007
@@ -25,6 +25,7 @@
 import org.w3c.dom.*;
 import org.xml.sax.SAXException;
 import org.xml.sax.SAXParseException;
+import org.xml.sax.ErrorHandler;
 
 import javax.jdo.spi.I18NHelper;
 import javax.jdo.spi.JDOImplHelper;
@@ -1222,6 +1223,24 @@
         InputStream in = null;
         try {
             DocumentBuilder builder = factory.newDocumentBuilder();
+            
+            builder.setErrorHandler(new ErrorHandler() {
+                public void error(SAXParseException exception)
+                        throws SAXException {
+                    throw exception;
+                }
+
+                public void fatalError(SAXParseException exception)
+                        throws SAXException {
+                    throw exception;
+                }
+
+                public void warning(SAXParseException exception)
+                        throws SAXException {
+                    // gulp
+                }
+            });
+
             in = url.openStream();
             Document doc = builder.parse(in);
 

Modified: db/jdo/trunk/api2/src/java/javax/jdo/JDOHelper.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/JDOHelper.java?view=diff&rev=545414&r1=545413&r2=545414
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/JDOHelper.java (original)
+++ db/jdo/trunk/api2/src/java/javax/jdo/JDOHelper.java Thu Jun  7 22:14:58 2007
@@ -25,6 +25,7 @@
 import org.w3c.dom.*;
 import org.xml.sax.SAXException;
 import org.xml.sax.SAXParseException;
+import org.xml.sax.ErrorHandler;
 
 import javax.jdo.spi.I18NHelper;
 import javax.jdo.spi.JDOImplHelper;
@@ -1222,6 +1223,24 @@
         InputStream in = null;
         try {
             DocumentBuilder builder = factory.newDocumentBuilder();
+            
+            builder.setErrorHandler(new ErrorHandler() {
+                public void error(SAXParseException exception)
+                        throws SAXException {
+                    throw exception;
+                }
+
+                public void fatalError(SAXParseException exception)
+                        throws SAXException {
+                    throw exception;
+                }
+
+                public void warning(SAXParseException exception)
+                        throws SAXException {
+                    // gulp
+                }
+            });
+
             in = url.openStream();
             Document doc = builder.parse(in);
 



Mime
View raw message