This is an automated email from the ASF dual-hosted git repository.

tilman pushed a commit to branch branch_2x
in repository https://gitbox.apache.org/repos/asf/tika.git

commit 132f2afdf0eb11953ba9b21f4c76aa1beee2ebfc
Author: Tilman Hausherr <til...@apache.org>
AuthorDate: Fri Aug 9 20:13:23 2024 +0200

    TIKA-4290: replace deprecated, add override
---
 .../org/apache/tika/extractor/ParsingEmbeddedDocumentExtractor.java   | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/tika-core/src/main/java/org/apache/tika/extractor/ParsingEmbeddedDocumentExtractor.java
 
b/tika-core/src/main/java/org/apache/tika/extractor/ParsingEmbeddedDocumentExtractor.java
index 8391624a3..f55755864 100644
--- 
a/tika-core/src/main/java/org/apache/tika/extractor/ParsingEmbeddedDocumentExtractor.java
+++ 
b/tika-core/src/main/java/org/apache/tika/extractor/ParsingEmbeddedDocumentExtractor.java
@@ -62,6 +62,7 @@ public class ParsingEmbeddedDocumentExtractor implements 
EmbeddedDocumentExtract
         this.context = context;
     }
 
+    @Override
     public boolean shouldParseEmbedded(Metadata metadata) {
         DocumentSelector selector = context.get(DocumentSelector.class);
         if (selector != null) {
@@ -79,6 +80,7 @@ public class ParsingEmbeddedDocumentExtractor implements 
EmbeddedDocumentExtract
         return true;
     }
 
+    @Override
     public void parseEmbedded(
             InputStream stream, ContentHandler handler, Metadata metadata, 
boolean outputHtml)
             throws SAXException, IOException {
@@ -99,7 +101,7 @@ public class ParsingEmbeddedDocumentExtractor implements 
EmbeddedDocumentExtract
         // Use the delegate parser to parse this entry
         try (TemporaryResources tmp = new TemporaryResources()) {
             final TikaInputStream newStream =
-                    TikaInputStream.get(new CloseShieldInputStream(stream), 
tmp, metadata);
+                    TikaInputStream.get(CloseShieldInputStream.wrap(stream), 
tmp, metadata);
             if (stream instanceof TikaInputStream) {
                 final Object container = ((TikaInputStream) 
stream).getOpenContainer();
                 if (container != null) {

Reply via email to