Skip to content

#2032: fixed broken output of commandlet env bash#2034

Open
oanding-blrng wants to merge 2 commits into
devonfw:mainfrom
oanding-blrng:fix/2032-commandlet-env-bash-leads-to-broken-output
Open

#2032: fixed broken output of commandlet env bash#2034
oanding-blrng wants to merge 2 commits into
devonfw:mainfrom
oanding-blrng:fix/2032-commandlet-env-bash-leads-to-broken-output

Conversation

@oanding-blrng

Copy link
Copy Markdown
Contributor

This PR fixes #2032

Implemented changes:

  • Added null-check in getToolPath() in GrallVm.java
  • Added log level checks to only log warnings, if user wants them with debug-mode

Testing instructions

Please add conscise, understandable instructions on how a reviewer can test/verify the functionality of your contribution here:

To test the fix for NullPointerException :

  1. Checkout commit #2032 Added null check to prevent NullPointerException in EnvironmentCommandlet.
  2. Modify IntelliJ Run configuration (working directory has to point to place outside of an IDEasy project):
image 3. Run configuration 4. No warnings, or errors are printed

To test correct log-level:

  1. Checkout commit 'commandlet env bash leads to broken output #2032 Added additional checks for logging level before logging warnings or errors in EnvironmentCommandlet.'
  2. Comment out null check in getToolPath() in GrallVm.java to reintroduce bug
  3. Run configuration mentioned above
  4. No errors or exceptions will be logged
  5. Modify commandline args to --debug env --bash
  6. Run modified configuration
  7. Error and exception will be logged

Checklist for this PR

Make sure everything is checked before merging this PR. For further info please also see
our DoD.

  • When running mvn clean test locally all tests pass and build is successful
  • PR title is of the form #«issue-id»: «brief summary» (e.g. #921: fixed setup.bat). If no issue ID exists, title only.
  • PR top-level comment summarizes what has been done and contains link to addressed issue(s)
  • PR and issue(s) have suitable labels
  • Issue is set to In Progress and assigned to you or there is no issue (might happen for very small PRs)
  • You followed all coding conventions
  • You have added the issue implemented by your PR in CHANGELOG.adoc unless issue is labeled
    with internal
  • You have formulated clear instructions on how to test your contribution under "Testing instructions"

@github-project-automation github-project-automation Bot moved this to 🆕 New in IDEasy board Jun 16, 2026
@oanding-blrng oanding-blrng self-assigned this Jun 16, 2026
@oanding-blrng oanding-blrng moved this from 🆕 New to 🏗 In progress in IDEasy board Jun 16, 2026
@coveralls

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 27630322442

Coverage decreased (-0.04%) to 71.242%

Details

  • Coverage decreased (-0.04%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 7 coverage regressions across 2 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

7 previously-covered lines in 2 files lost coverage.

File Lines Losing Coverage Coverage
com/devonfw/tools/ide/commandlet/EnvironmentCommandlet.java 6 82.64%
com/devonfw/tools/ide/version/VersionSegment.java 1 89.76%

Coverage Stats

Coverage Status
Relevant Lines: 16226
Covered Lines: 12055
Line Coverage: 74.29%
Relevant Branches: 7256
Covered Branches: 4674
Branch Coverage: 64.42%
Branches in Coverage %: Yes
Coverage Strength: 3.14 hits per line

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🏗 In progress

Development

Successfully merging this pull request may close these issues.

commandlet env bash leads to broken output

2 participants