# HG changeset patch # User joehw # Date 1382034159 25200 # Node ID 0c63befdae8a41e6601d0ac5d708f5ced80d2e1e # Parent bb128fd25c3c7cfa686b0bd1fda561d368c8c8fe 8015243: SchemaFactory does not catch enum. value that is not in the value space of the base type, anyURI Reviewed-by: lancea diff -r bb128fd25c3c -r 0c63befdae8a jaxp/src/com/sun/org/apache/xerces/internal/util/URI.java --- a/jaxp/src/com/sun/org/apache/xerces/internal/util/URI.java Tue Oct 15 14:16:49 2013 +0100 +++ b/jaxp/src/com/sun/org/apache/xerces/internal/util/URI.java Thu Oct 17 11:22:39 2013 -0700 @@ -689,9 +689,13 @@ if (!initializeAuthority(uriSpec.substring(startPos, index))) { index = startPos - 2; } - } - else { + } else if (index < uriSpecLen) { + //Same as java.net.URI: + // DEVIATION: Allow empty authority prior to non-empty + // path, query component or fragment identifier m_host = ""; + } else { + throw new MalformedURIException("Expected authority."); } }