Skip to content

#1760: accept empty input for one option#1803

Open
ducminh02 wants to merge 4 commits intodevonfw:mainfrom
ducminh02:feature/1760-accept-empty-input-for-one-option
Open

#1760: accept empty input for one option#1803
ducminh02 wants to merge 4 commits intodevonfw:mainfrom
ducminh02:feature/1760-accept-empty-input-for-one-option

Conversation

@ducminh02
Copy link
Copy Markdown

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

Checklist for tool commandlets

Have you added a new «tool» as commandlet? There are the following additional checks:

  • The tool can be installed automatically (during setup via settings) or via the commandlet call
  • The tool is isolated in its IDEasy project, see Sandbox Principle
  • The new tool is added to the table of tools in LICENSE.asciidoc
  • The new commandlet is a command-wrapper for «tool»
  • Proper help texts for all supported languages are added here
  • The new commandlet installs potential dependencies automatically
  • The variables «TOOL»_VERSION and «TOOL»_EDITION are honored by your commandlet
  • The new commandlet is tested on all platforms it is available for or tested on all platforms that are in scope of the linked issue

@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

Coverage Report for CI Build 24087875064

Coverage increased (+0.03%) to 70.496%

Details

  • Coverage increased (+0.03%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 85 coverage regressions across 1 file.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

85 previously-covered lines in 1 file lost coverage.

File Lines Losing Coverage Coverage
com/devonfw/tools/ide/context/AbstractIdeContext.java 85 66.19%

Coverage Stats

Coverage Status
Relevant Lines: 15074
Covered Lines: 11077
Line Coverage: 73.48%
Relevant Branches: 6696
Covered Branches: 4270
Branch Coverage: 63.77%
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Team Review

Development

Successfully merging this pull request may close these issues.

Accept empty input for single option

4 participants