jdk
jdk copied to clipboard
8342090: Infer::IncorporationBinaryOp::equals can produce side-effects
Type inference uses a cache to store incorporation operations already done. This way we can avoid redoing operations that once done won't produce any change. This can reduce the compilation time when the number of inference variables involved is not trivial. The elements in the cache are implemented with class com.sun.tools.javac.comp.Infer::IncorporationBinaryOp
the problem here is that the equals method of this class can produce side effects, implying that after a comparison the compared objects can mutate. This patch is fixing this issue,
TIA
Progress
- [ ] Change must be properly reviewed (1 review required, with at least 1 Reviewer)
- [x] Change must not contain extraneous whitespace
- [x] Commit message must refer to an issue
Warning
⚠️ Found leading lowercase letter in issue title for 8288590: javac failure: incompatible types: cannot infer type arguments due to Object.hashCode collision
Issues
- JDK-8342090: Infer::IncorporationBinaryOp::equals can produce side-effects (Bug - P4)
- JDK-8288590: javac failure: incompatible types: cannot infer type arguments due to Object.hashCode collision (Bug - P3)
Contributors
- Maurizio Cimadamore
<[email protected]>
Reviewing
Using git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/21651/head:pull/21651
$ git checkout pull/21651
Update a local copy of the PR:
$ git checkout pull/21651
$ git pull https://git.openjdk.org/jdk.git pull/21651/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 21651
View PR using the GUI difftool:
$ git pr show -t 21651
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/21651.diff