Skip to content

[TIKA-4704] delete intermediate file and directory; improve javadoc; use jdk11 methods; use try-with-resources#2728

Merged
THausherr merged 5 commits intomainfrom
TIKA-4704-7
Apr 1, 2026
Merged

[TIKA-4704] delete intermediate file and directory; improve javadoc; use jdk11 methods; use try-with-resources#2728
THausherr merged 5 commits intomainfrom
TIKA-4704-7

Conversation

@THausherr
Copy link
Copy Markdown
Contributor

Thanks for your contribution to Apache Tika! Your help is appreciated!

Before opening the pull request, please verify that

  • there is an open issue on the Tika issue tracker which describes the problem or the improvement. We cannot accept pull requests without an issue because the change wouldn't be listed in the release notes.
  • the issue ID (TIKA-XXXX)
    • is referenced in the title of the pull request
    • and placed in front of your commit messages surrounded by square brackets ([TIKA-XXXX] Issue or pull request title)
  • commits are squashed into a single one (or few commits for larger changes)
  • Tika is successfully built and unit tests pass by running ./mvnw clean test
  • there should be no conflicts when merging the pull request branch into the recent main branch. If there are conflicts, please try to rebase the pull request branch on top of a freshly pulled main branch
  • if you add new module that downstream users will depend upon add it to relevant group in tika-bom/pom.xml.

We will be able to faster integrate your pull request if these conditions are met. If you have any questions how to fix your problem or about using Tika in general, please sign up for the Tika mailing list. Thanks!

Copilot AI review requested due to automatic review settings March 31, 2026 19:26
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates CXFTestBase test utilities to modernize stream handling (JDK 11 APIs), improve config handling for pipes-based parsing, and clarify related Javadocs.

Changes:

  • Replace IOUtils.copy(...) usage with InputStream.transferTo(...) / readAllBytes().
  • Refactor pipes config setup to avoid overwriting the field during intermediate merge steps.
  • Add/adjust Javadoc and logging around temporary config lifecycle.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

THausherr and others added 2 commits March 31, 2026 21:32
…ver/core/CXFTestBase.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Removed logging of config file deletion and improved formatting in CXFTestBase.java.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (2)

tika-server/tika-server-core/src/test/java/org/apache/tika/server/core/CXFTestBase.java:450

  • In these test helpers, Files.delete(tempFile) in a finally can throw and mask the original failure from reading/parsing the archive, making debugging harder. Consider using deleteIfExists and suppressing/logging deletion failures (similar to tearDown()).
        } finally {
            if (tempFile != null) {
                Files.delete(tempFile);
            }

tika-server/tika-server-core/src/test/java/org/apache/tika/server/core/CXFTestBase.java:473

  • Same concern here: Files.delete(tempFile) in the finally block can override the original exception from zip processing. Using deleteIfExists and suppressing/logging IOExceptions would keep the primary test failure visible.
        } finally {
            if (tempFile != null) {
                Files.delete(tempFile);
            }

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@THausherr THausherr changed the title [TIKA-4704] delete intermediate file; improve javadoc; use jdk11 methods [TIKA-4704] delete intermediate file and directory; improve javadoc; use jdk11 methods; use try-with-resources Apr 1, 2026
@THausherr THausherr merged commit bc57575 into main Apr 1, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants