Closed HannesWell closed 2 years ago
Thanks Hannes, no need to keep legacy code around. I would have expected that API tooling complains here, but as it does not, I merge it.
Thanks again, Hannes.
Is this really about old 2.0 plugins or simply some preferences format at version 2.1 that is disjoint from Eclipse 2.0 release? I honestly don't know, but worry not enough thought was put into removing this.
Is this really about old 2.0 plugins or simply some preferences format at version 2.1 that is disjoint from Eclipse 2.0 release? I honestly don't know, but worry not enough thought was put into removing this.
Me neither. I can only tell that these preferences were already considered legacy when this class was initially commited into this repository in 2005: https://github.com/eclipse-equinox/equinox.bundles/blob/45009ada3d70007a38c2b01760ee3990156cf0f3/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/InstancePreferences.java
From this I would expect that it won't affect many people, but as I said, I don't have a good overview in this area.
There is a new test fail caused by this change, tests must be updated too.
org.eclipse.core.tests.internal.preferences.EclipsePreferencesTest | testLegacy | Failure |
3.0 expected:<value.1649981901638-0.3893493642818254> but was:<null>junit.framework.ComparisonFailure: 3.0 expected:<value.1649981901638-0.3893493642818254> but was:<null>at junit.framework.Assert.assertEquals(Assert.java:100)at junit.framework.TestCase.assertEquals(TestCase.java:253)at org.eclipse.core.tests.internal.preferences.EclipsePreferencesTest.testLegacy(EclipsePreferencesTest.java:1091)at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Thank you Andrey for fixing the test!
The comment of the removed test contains a Bug reference: Bug 56020 Although it does not provide much more context it says that the corresponding preferences format was already considered legacy in 2004. Without knowing more I tend to say that after 18years a legacy preference format does not need to be supported anymore.
As suggested by @vogella in PR #13 this PR suggests to remove the code to load legacy Eclipse 2.1 preference files that are not supported for a while. I cannot tell since when those files were considered legacy but in the beginning of the git history of the
InstancePreferences
class 16 years ago they were already considered legacy. And I don't expect anybody to update from a more than 16year old Eclipse to a current one and to expect that it will work out of the box. But somebody with a greater overview should make the decision to submit this or not.