[jdom-interest] Minor SAXBuilder fix
Alex Rosen
arosen at silverstream.com
Mon Feb 25 09:13:00 PST 2002
On 11/5/01, we changed SAXBuilder so that saxDriverClass no longer gets set
after creating the parser using JAXP (see
http://www.servlets.com/archive/servlet/ReadMsg?msgId=160131&listName=jdom-i
nterest). So in our error messages, we can no longer rely on saxDriverClass
to tell the user which parser we're complaining about - we have to actually
get the parser's class each time.
Also - we are still setting saxDriverClass, if JAXP is not available. I
assume that this is an OK thing to do? It should only be a problem if JAXP
is not initially available to your SAXBuilder, but then it become available
the second time. Seems unlikely.
Alex
-------------- next part --------------
Index: SAXBuilder.java
===================================================================
RCS file: /home/cvspublic/jdom/src/java/org/jdom/input/SAXBuilder.java,v
retrieving revision 1.63
diff -c -r1.63 SAXBuilder.java
*** SAXBuilder.java 2002/02/08 02:49:41 1.63
--- SAXBuilder.java 2002/02/26 01:10:56
***************
*** 608,614 ****
// No entity expansion available
throw new JDOMException(
"Entity expansion feature not recognized by " +
! saxDriverClass);
*/
}
catch (SAXNotSupportedException e) {
--- 608,614 ----
// No entity expansion available
throw new JDOMException(
"Entity expansion feature not recognized by " +
! parser.getClass().getName());
*/
}
catch (SAXNotSupportedException e) {
***************
*** 616,622 ****
// No entity expansion available
throw new JDOMException(
"Entity expansion feature not supported by " +
! saxDriverClass);
*/
}
}
--- 616,622 ----
// No entity expansion available
throw new JDOMException(
"Entity expansion feature not supported by " +
! parser.getClass().getName());
*/
}
}
***************
*** 633,642 ****
parser.setFeature(feature, value);
} catch (SAXNotSupportedException e) {
throw new JDOMException(
! displayName + " feature not supported for SAX driver " + saxDriverClass);
} catch (SAXNotRecognizedException e) {
throw new JDOMException(
! displayName + " feature not recognized for SAX driver " + saxDriverClass);
}
}
--- 633,642 ----
parser.setFeature(feature, value);
} catch (SAXNotSupportedException e) {
throw new JDOMException(
! displayName + " feature not supported for SAX driver " + parser.getClass().getName());
} catch (SAXNotRecognizedException e) {
throw new JDOMException(
! displayName + " feature not recognized for SAX driver " + parser.getClass().getName());
}
}
***************
*** 652,661 ****
parser.setProperty(property, value);
} catch (SAXNotSupportedException e) {
throw new JDOMException(
! displayName + " property not supported for SAX driver " + saxDriverClass);
} catch (SAXNotRecognizedException e) {
throw new JDOMException(
! displayName + " property not recognized for SAX driver " + saxDriverClass);
}
}
--- 652,661 ----
parser.setProperty(property, value);
} catch (SAXNotSupportedException e) {
throw new JDOMException(
! displayName + " property not supported for SAX driver " + parser.getClass().getName());
} catch (SAXNotRecognizedException e) {
throw new JDOMException(
! displayName + " property not recognized for SAX driver " + parser.getClass().getName());
}
}
More information about the jdom-interest
mailing list