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 2004/03/04 23:48:09 UTC
cvs commit: xml-xerces/java/src/org/apache/xerces/xinclude XIncludeHandler.java
mrglavas 2004/03/04 14:48:09
Modified: java/src/org/apache/xerces/xinclude XIncludeHandler.java
Log:
Partial fix for Bug #27422:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27422
Report a fatal error for malformed byte sequences in a
given encoding, specifically UTF-8 and US-ASCII.
Revision Changes Path
1.23 +6 -1 xml-xerces/java/src/org/apache/xerces/xinclude/XIncludeHandler.java
Index: XIncludeHandler.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/xinclude/XIncludeHandler.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- XIncludeHandler.java 24 Feb 2004 23:15:52 -0000 1.22
+++ XIncludeHandler.java 4 Mar 2004 22:48:08 -0000 1.23
@@ -24,6 +24,7 @@
import org.apache.xerces.impl.Constants;
import org.apache.xerces.impl.XMLEntityManager;
import org.apache.xerces.impl.XMLErrorReporter;
+import org.apache.xerces.impl.io.MalformedByteSequenceException;
import org.apache.xerces.util.AugmentationsImpl;
import org.apache.xerces.util.IntStack;
import org.apache.xerces.util.ParserConfigurationSettings;
@@ -1263,6 +1264,10 @@
}
reader.setErrorReporter(fErrorReporter);
reader.parse();
+ }
+ catch (MalformedByteSequenceException ex) {
+ fErrorReporter.reportError(ex.getDomain(), ex.getKey(),
+ ex.getArguments(), XMLErrorReporter.SEVERITY_FATAL_ERROR);
}
catch (IOException e) {
reportResourceError(
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org