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

reverse merge of workspace settings not sorting properties anymore #470

Closed
hohwille opened this issue Sep 25, 2020 · 4 comments · Fixed by #490
Closed

reverse merge of workspace settings not sorting properties anymore #470

hohwille opened this issue Sep 25, 2020 · 4 comments · Fixed by #490
Assignees
Labels
bug Something isn't working configurator related to our configurator tool that manages IDE settings for Eclipse, Intellij, vscode, etc. good-first-issue Good for newcomers help wanted Extra attention is needed

Comments

@hohwille
Copy link
Member

  1. devon eclipse ws-reverse
  2. check your *.prefs files

Expected result:
*.prefs files should be sorted alphabetically to make diffs of git changes more readable

Actual result:
*.prefs files seem to be in the order as written by eclipse (=chaotic order).

@hohwille hohwille added bug Something isn't working configurator related to our configurator tool that manages IDE settings for Eclipse, Intellij, vscode, etc. labels Sep 25, 2020
@hohwille
Copy link
Member Author

Seems something broke here:

public class SortedProperties extends Properties {

Maybe happened due to newer Java version and changed behaviour of java.util.Properties.

@hohwille
Copy link
Member Author

Please add a JUnit Test creating SortedProperties, writing to String and then assert the result is in alphabetical order. This test should fail. Then fix the issue and verify the test got green.

@hohwille hohwille added good-first-issue Good for newcomers help wanted Extra attention is needed labels Sep 28, 2020
@hohwille
Copy link
Member Author

As no-one took over, I will do this...

@hohwille
Copy link
Member Author

Problem was that keySet was overriden to apply sort but with more recent Java (after 1.8) version entrySet is used by store method instead of keySet.
As you can see in PR #490 we need to also override entrySet and sort the resulting set to fix and make it work also with newer JDK (11+).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working configurator related to our configurator tool that manages IDE settings for Eclipse, Intellij, vscode, etc. good-first-issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant