Under some JDK's (notably both Sun and IBM 1.4.0), getClassLoader(), when invoked
on the JAXP or SAX classes, it returns null. This means that
the fallback mechanism in these APIs may not work correctly: in
particular, when an attempt to invoke an unknown Parser/XMLReader
implementation is made in SAX, a NullPointerException rather than the correct
ClassNotFoundException results. This patch fixes this problem,
by using Class.forName() in the event that the bootstrap
classloader is not returned in this particular situation.
git-svn-id: https://svn.apache.org/repos/asf/xml/commons/trunk@226239 13f79535-47bb-0310-9956-ffa450edef68
The reader used to read the service provider is never
closed if an IOException is thrown while reading from
it. Adding a finally block so that the reader will
always be closed.
git-svn-id: https://svn.apache.org/repos/asf/xml/commons/trunk@226238 13f79535-47bb-0310-9956-ffa450edef68
When reading the service provider name from a jar
a BufferedReader is used to read the first line from the
file. BufferedReader's default buffer size is 8K chars. Since
we're only reading one line (the name of a class) this is pretty
excessive. Reducing this size significantly to 80 chars.
git-svn-id: https://svn.apache.org/repos/asf/xml/commons/trunk@226237 13f79535-47bb-0310-9956-ffa450edef68
following the missing end tag to be formatted entirely in the "code" format. Fixed a few
instances where *s were inadverently included in the Javadoc text that should not have
been.
git-svn-id: https://svn.apache.org/repos/asf/xml/commons/trunk@226236 13f79535-47bb-0310-9956-ffa450edef68
Pass the message from the cause Throwable to the super constructor,
so that the getMessage() method on this XPathException would
return the message of the cause.
git-svn-id: https://svn.apache.org/repos/asf/xml/commons/trunk@226234 13f79535-47bb-0310-9956-ffa450edef68
the service provider is never closed if an IOException is
thrown while reading from it. Adding a finally block so
that the reader will always be closed.
git-svn-id: https://svn.apache.org/repos/asf/xml/commons/trunk@226227 13f79535-47bb-0310-9956-ffa450edef68
Improving the performance of toString() by caching the result.
Improving the performance of equals() by first checking if the QName is the
same object and then by checking whether the local names are equal before
looking at the namespace URI. Since it's more likely that the namespaces
will be equal, we can return false faster when the local names are different.
git-svn-id: https://svn.apache.org/repos/asf/xml/commons/trunk@226225 13f79535-47bb-0310-9956-ffa450edef68
vendor and Java version and vendor from values specified in build.xml, rather
than hard-coding. Merging these changes in from the tck-jaxp-1_2_0 branch.
git-svn-id: https://svn.apache.org/repos/asf/xml/commons/trunk@226218 13f79535-47bb-0310-9956-ffa450edef68
<code>QName<code> --> <code>QName</code>
This caused the Javadoc for the methods following this constructor to be
formatted entirely in the "code" format.
git-svn-id: https://svn.apache.org/repos/asf/xml/commons/trunk@226212 13f79535-47bb-0310-9956-ffa450edef68
Prior to JDK 1.4 the exception chaining mechanism didn't
exist. If we're on JDK 1.4 we'll now call Throwable.initCause
by reflection, otherwise we just keep a local copy of the
chained exception. Added a readObject method so
that instances of this class can be serialized/deserialized
between JDK 1.4+ and JDK 1.3 (and below).
git-svn-id: https://svn.apache.org/repos/asf/xml/commons/trunk@226209 13f79535-47bb-0310-9956-ffa450edef68