Skip to content

#2717:-Saving-properties-duplicates-a-variable-that-was-declared-with… - #2758

Open
capg-leo wants to merge 7 commits into
devonfw:mainfrom
capg-leo:#2717-Saving-properties-duplicates-a-variable-that-was-declared-with-its-legacy-name-(e.g.-MAVEN_VERSION)
Open

capg-leo wants to merge 7 commits into
devonfw:mainfrom
capg-leo:#2717-Saving-properties-duplicates-a-variable-that-was-declared-with-its-legacy-name-(e.g.-MAVEN_VERSION)

Conversation

@capg-leo

@capg-leo capg-leo commented Oct 28, 2026 •

Copy link
Copy Markdown

This PR fixes #2717

Implemented changes:

  • Fixed duplicate variable definitions when saving variables with legacy names.
  • Use the migrated variable name when removing modified variables.
  • Added a regression test for migrating MAVEN_VERSION to MVN_VERSION
  • Changelog entry

Testing instructions

  1. Run mvn -pl cli -Dtest=EnvironmentVariablesPropertiesFileTest test.
  2. Verify that all tests pass.

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 and not feature/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 labelled
    with internal
  • You have not changed any dependency in pom.xml files or otherwise if runtime dependencies changed,
    you have updated our LICENSE.adoc
  • 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 Oct 28, 2026
@capg-leo capg-leo added good first issue Good for newcomers configuration should be configurable or configuration change labels Oct 28, 2026
@coveralls

coveralls commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 43042993844

Coverage increased (+0.02%) to 75.363%

Details

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

Uncovered Changes

No uncovered changes found.

Coverage Regressions

1 previously-covered line in 1 file lost coverage.

File Lines Losing Coverage Coverage
com/devonfw/tools/ide/version/VersionSegment.java 1 91.63%

Coverage Stats

Coverage Status
Relevant Lines: 20949
Covered Lines: 16483
Line Coverage: 78.68%
Relevant Branches: 9489
Covered Branches: 6456
Branch Coverage: 68.04%
Branches in Coverage %: Yes
Coverage Strength: 3.39 hits per line

💛 - Coveralls

@capg-leo capg-leo moved this from 🆕 New to Team Review in IDEasy board Oct 28, 2026
@laim2003
laim2003 requested a review from majesteSil October 29, 2026 10:12
@majesteSil

Copy link
Copy Markdown
Contributor

Thanks for this contribution! The fix is exactly the one suggested in the issue, using the migrated name newLine.getName() in save() and the new regression test is a genuine guard. The diff stays small with just the one-line fix, the test and the changelog entry. The remaining points are not blocking: two optional coverage gaps on the test (asserting that reloading the file is duplicate-free, and covering a second legacy name such as DEVON_IDE_TOOLS to fully close the "all variables with a legacy name" claim from the issue). Nothing here holds the PR back.

@majesteSil majesteSil moved this from Team Review to 🏗 In progress in IDEasy board Nov 5, 2026
@majesteSil majesteSil moved this from 🏗 In progress to Team Review in IDEasy board Nov 5, 2026
@majesteSil majesteSil moved this from Team Review to 🏗 In progress in IDEasy board Nov 5, 2026
@majesteSil majesteSil assigned capg-leo and unassigned majesteSil Nov 5, 2026
@capg-leo
capg-leo requested a review from majesteSil November 11, 2026 15:08
@capg-leo capg-leo moved this from 🏗 In progress to Team Review in IDEasy board Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

configuration should be configurable or configuration change good first issue Good for newcomers

Projects

Status: Team Review

Development

Successfully merging this pull request may close these issues.

Saving properties duplicates a variable that was declared with its legacy name (e.g. MAVEN_VERSION)

3 participants