Skip to content

use try-with-resources statement in CommonsCliOptions#2440

Closed
Pankraz76 wants to merge 1 commit intoapache:masterfrom
Pankraz76:invoker
Closed

use try-with-resources statement in CommonsCliOptions#2440
Pankraz76 wants to merge 1 commit intoapache:masterfrom
Pankraz76:invoker

Conversation

@Pankraz76
Copy link
Contributor

@Pankraz76 Pankraz76 commented Jun 5, 2025

Following this checklist to help us incorporate your
contribution quickly and easily:

  • Make sure there is a JIRA issue filed
    for the change (usually before you start working on it). Trivial changes like typos do not
    require a JIRA issue. Your pull request should address just this issue, without
    pulling in other changes.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Format the pull request title like [MNG-XXX] SUMMARY,
    where you replace MNG-XXX and SUMMARY with the appropriate JIRA issue.
  • Also format the first line of the commit message like [MNG-XXX] SUMMARY.
    Best practice is to use the JIRA issue title in both the pull request title and in the first line of the commit message.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Run mvn clean verify to make sure basic checks pass. A more thorough check will
    be performed on your pull request automatically.
  • You have run the Core IT successfully.

If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.

To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

@Pankraz76 Pankraz76 marked this pull request as ready for review June 5, 2025 18:38
@slachiewicz slachiewicz marked this pull request as draft June 6, 2025 17:21
@Pankraz76 Pankraz76 marked this pull request as ready for review June 6, 2025 18:33
@Pankraz76 Pankraz76 requested a review from gnodet June 6, 2025 18:33
@Pankraz76 Pankraz76 changed the title use try-with-resources statement in impl/maven-cli/src/main/java/org/apache/maven/cling/invoker [MNG-XXX] use try-with-resources statement in impl/maven-cli/src/main/java/org/apache/maven/cling/invoker Jun 6, 2025
@Pankraz76 Pankraz76 changed the title [MNG-XXX] use try-with-resources statement in impl/maven-cli/src/main/java/org/apache/maven/cling/invoker use try-with-resources statement in impl/maven-cli/src/main/java/org/apache/maven/cling/invoker Jun 7, 2025
@Pankraz76
Copy link
Contributor Author

isolated issue:

[INFO] 
Error:  Failures: 
Error:    ForkedMavenExecutorTest>MavenExecutorTestSupport.defaultFsCaptureOutput:173 No INFO found ==> expected: <true> but was: <false>
Error:    ForkedMavenExecutorTest>MavenExecutorTestSupport.defaultFsCaptureOutputWithForcedColor:191 No ANSI codes present ==> expected: <true> but was: <false>
Error:    ForkedMavenExecutorTest>MavenExecutorTestSupport.defaultFsCaptureOutputWithForcedOffColor:211 No INFO found ==> expected: <true> but was: <false>
Error:    ForkedMavenExecutorTest>MavenExecutorTestSupport.version:127 expected: <4.0.0-rc-4-SNAPSHOT> but was: <unknown>
[INFO] 
Error:  Tests run: 54, Failures: 4, Errors: 0, Skipped: 1
[INFO] 

@Pankraz76 Pankraz76 changed the title use try-with-resources statement in impl/maven-cli/src/main/java/org/apache/maven/cling/invoker use try-with-resources statement in CommonsCliOptions Jun 8, 2025
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.

3 participants