Skip to content

#1760: accept empty input for one option#1803

Merged
hohwille merged 6 commits into
devonfw:mainfrom
ducminh02:feature/1760-accept-empty-input-for-one-option
Apr 10, 2026
Merged

#1760: accept empty input for one option#1803
hohwille merged 6 commits into
devonfw:mainfrom
ducminh02:feature/1760-accept-empty-input-for-one-option

Conversation

@ducminh02
Copy link
Copy Markdown
Contributor

@ducminh02 ducminh02 commented Apr 7, 2026

This PR fixes #1760

Implemented changes:

  • Updated displayOptionsAndGetAnswer in AbstractIdeContext.java to automatically select a single available option only if it is not a vulnerable tool version, ensuring users must still explicitly accept version-related risks.

  • Adjusted the unit test in IdeContextTest.java to use a real Cve (vulnerability) object, verifying that the system correctly stops to prompt the user when a single but "unsafe" version is offered.


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

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 7, 2026

CLA assistant check
All committers have signed the CLA.

@coveralls
Copy link
Copy Markdown
Collaborator

coveralls commented Apr 7, 2026

Coverage Report for CI Build 24230232616

Coverage decreased (-0.004%) to 70.466%

Details

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

Uncovered Changes

No uncovered changes found.

Coverage Regressions

70 previously-covered lines in 2 files lost coverage.

File Lines Losing Coverage Coverage
com/devonfw/tools/ide/context/AbstractIdeContext.java 67 65.92%
com/devonfw/tools/ide/git/repository/RepositoryCommandlet.java 3 70.98%

Coverage Stats

Coverage Status
Relevant Lines: 15068
Covered Lines: 11068
Line Coverage: 73.45%
Relevant Branches: 6690
Covered Branches: 4264
Branch Coverage: 63.74%
Branches in Coverage %: Yes
Coverage Strength: 3.1 hits per line

💛 - Coveralls

@jakozian jakozian self-requested a review April 8, 2026 08:53
@jakozian jakozian moved this from 🆕 New to Team Review in IDEasy board Apr 8, 2026
Comment thread cli/src/main/java/com/devonfw/tools/ide/context/AbstractIdeContext.java Outdated
Copy link
Copy Markdown
Member

@hohwille hohwille left a comment

Choose a reason for hiding this comment

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

@ducminh02 excellent KISS fix and great test improvement to cover the functionality. 👍
Please add to CHANGELOG, then ready for merge.

@github-project-automation github-project-automation Bot moved this from Team Review to 👀 In review in IDEasy board Apr 9, 2026
@hohwille hohwille added this to the release:2026.04.002 milestone Apr 9, 2026
@hohwille hohwille added security CVEs or other vulnerabilities core FileAccess, ProcessUtil, IdeContext, etc. labels Apr 10, 2026
@hohwille hohwille merged commit 6f34d3c into devonfw:main Apr 10, 2026
4 checks passed
@github-project-automation github-project-automation Bot moved this from 👀 In review to ✅ Done in IDEasy board Apr 10, 2026
MarvMa pushed a commit to MarvMa/IDEasy that referenced this pull request Apr 17, 2026
MarvMa pushed a commit to MarvMa/IDEasy that referenced this pull request Apr 17, 2026
laim2003 added a commit to laim2003/IDEasy that referenced this pull request Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core FileAccess, ProcessUtil, IdeContext, etc. security CVEs or other vulnerabilities

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

Accept empty input for single option

5 participants