Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Faulty legacy warnings about non existing devon.properties #942

Open
hohwille opened this issue Jan 15, 2025 · 1 comment
Open

Faulty legacy warnings about non existing devon.properties #942

hohwille opened this issue Jan 15, 2025 · 1 comment
Assignees
Labels
bug Something isn't working good first issue Good for newcomers status StatusCommandlet (ide status)

Comments

@hohwille
Copy link
Member

$ ide
IDE_ROOT is set to C:\Users\joerg\projects
IDE_HOME is set to C:\Users\joerg\projects\IDEasy
You are online.
Your settings are up-to-date.
Found legacy properties C:\Users\joerg\projects\IDEasy\conf\devon.properties
Found legacy properties C:\Users\joerg\projects\IDEasy\workspaces\main\devon.properties
Found legacy properties C:\Users\joerg\projects\IDEasy\settings\devon.properties
Found legacy properties C:\Users\joerg\devon.properties
Your settings are outdated and contain legacy configurations. Please consider upgrading your settings:
https://github.com/devonfw/IDEasy/blob/main/documentation/settings.adoc#upgrade
IDE environment variables have been set for /c/Users/joerg/projects/IDEasy in workspace main

Please see the warnings about Found legacy properties....

But the fact is that none of these legacy properties even exists:

$ ls /c/Users/joerg/projects/IDEasy/conf/
ide.properties  mvn/  npm/

Comments

I guess we had some code checking for this that was making his choice via EnvironmentVariablesProperties.getLegacyPropertiesFilePath() != null.
This has changed but this has always been wrong then since only if the file really exists, we need to print the warning. Earlier the method was returning null if it internally found out that the Path does not exist.

@hohwille hohwille added the bug Something isn't working label Jan 15, 2025
@github-project-automation github-project-automation bot moved this to 🆕 New in IDEasy board Jan 15, 2025
@hohwille hohwille added this to the release:2025.01.001 milestone Jan 15, 2025
@hohwille
Copy link
Member Author

Here is the bug:

Path legacyProperties = variables.getLegacyPropertiesFilePath();
if (legacyProperties != null) {
hasLegacyProperties = true;
this.context.warning("Found legacy properties {}", legacyProperties);
}

Add Files.exists to the if to fix it.

@hohwille hohwille added good first issue Good for newcomers status StatusCommandlet (ide status) labels Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers status StatusCommandlet (ide status)
Projects
Status: 🆕 New
Development

No branches or pull requests

2 participants