This is an automated email from the ASF dual-hosted git repository.
tallison pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tika.git
The following commit(s) were added to refs/heads/main by this push:
new 225d7e5 TIKA-3009 -- workaround for weblogic's xml parser
225d7e5 is described below
commit 225d7e572e3bcf980793c60a38e3bfb362f57e31
Author: tallison <[email protected]>
AuthorDate: Fri Oct 30 15:12:21 2020 -0400
TIKA-3009 -- workaround for weblogic's xml parser
---
tika-core/src/main/java/org/apache/tika/utils/XMLReaderUtils.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tika-core/src/main/java/org/apache/tika/utils/XMLReaderUtils.java
b/tika-core/src/main/java/org/apache/tika/utils/XMLReaderUtils.java
index e30374c..9cbbccd 100644
--- a/tika-core/src/main/java/org/apache/tika/utils/XMLReaderUtils.java
+++ b/tika-core/src/main/java/org/apache/tika/utils/XMLReaderUtils.java
@@ -634,7 +634,11 @@ public class XMLReaderUtils implements Serializable {
* @param parser parser to return
*/
private static void releaseParser(PoolSAXParser parser) {
- parser.reset();
+ try {
+ parser.reset();
+ } catch (UnsupportedOperationException e) {
+ //TIKA-3009 -- we really shouldn't have to do this... :(
+ }
//if this is a different generation, don't put it back
//in the pool
if (parser.getGeneration() != POOL_GENERATION.get()) {