Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #94 from stefanbirkner/oldxerces

Handle UnsupportedOperationException when creating XSDVALIDATING.
  • Loading branch information...
commit 804eb7b9a002b2975ea23464a647410e6ed1e9c6 2 parents 8c92811 + f43ba50
@rolfl rolfl authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 core/src/java/org/jdom2/input/sax/XMLReaders.java
View
6 core/src/java/org/jdom2/input/sax/XMLReaders.java
@@ -128,6 +128,12 @@ private XMLReaders(int validate) {
// this system does not support XSD Validation.... which is true for android!
// we could not get a validating system, set the fac to null
fac = null;
+ } catch (UnsupportedOperationException uoe) {
+ // SAXParserFactory throws this exception when setSchema is called.
+ // Therefore every factory throws this exception unless it overrides
+ // setSchema. A popular example is Apache Xerces SAXParserFactoryImpl
+ // before version 2.7.0.
+ fac = null;
}
break;
}
Please sign in to comment.
Something went wrong with that request. Please try again.