eclipse-jdt / eclipse-jdt/eclipse.jdt.debug
Instance compliance preference values matching defaults are modified by JavaRuntime.updateCompliance
- Dominant language
- Java
- Stars
- 23
- Forks
- 68
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 13
Description
I think the [fix](https://github.com/eclipse-jdt/eclipse.jdt.debug/commit/16a9ce1f0346fc8e0a4ba79f310b86a229bfcd00) for [bug 109392](https://bugs.eclipse.org/bugs/show_bug.cgi?id=109392) was incomplete. If I have deliberately set instance preferences for compliance that match the default compliance preferences, they are overridden by the logic in `JavaRuntime.updateCompliance`:
https://github.com/eclipse-jdt/eclipse.jdt.debug/blob/8dd15bd74fba195e7436526ba7240376a383f68f/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/JavaRuntime.java#L3349-L3355
I was bitten by this when adding Oomph installation setup tasks in Eclipse 2025-03 that set Java 1.8 compliance preferences and not understanding why they were overwritten when setting Java 9 compliance worked fine.
A fix would be to instead explicitly check that there are no non-default scoped Java compliance preferences before modifying them, instead of just comparing the values with the defaults.
Contributor guide
Assessment
This issue has not been assessed yet.