Skip to content

Commit

Permalink
Add #1588 to changelogs
Browse files Browse the repository at this point in the history
  • Loading branch information
KronicDeth committed Sep 20, 2019
1 parent 5650f81 commit a9612d9
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,12 @@
* Don't log if partial or no header typeID is read. It happens too often due to `.beam` files being written partially to disk during the build process. They will be re-indexed when they are complete.
* [#1587](https://github.com/KronicDeth/intellij-elixir/pull/1587) - [@KronicDeth](https://github.com/KronicDeth)
* Update gradle intellij plugin to fix `runIde` on newer macOS.
* [#1588](https://github.com/KronicDeth/intellij-elixir/pull/1588) - [@KronicDeth](https://github.com/KronicDeth)
* Fix `ConcurrentModificationException` in Structure View

Java 9 fixed a bug (https://bugs.openjdk.java.net/browse/JDK-8071667) in `HashMap` where `computeIfAbsent` did not check for concurrent modifications, and it turns out that `TreeElementList` was using concurrent modifications, so it was now broke.

Fixed by use `get` or `put` if it is absent, so that `putNew` can ensure that the `CallDefinition` is in the `TreeElementList` before it is added to the `MutableList<TreeElement>`, which was the original reason why there was a `put` inside of `computeIfAbsent`, which would have `put` when the function returned anyway.

## v11.0.1
### Bug Fixes
Expand Down
16 changes: 16 additions & 0 deletions resources/META-INF/changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,22 @@ <h1>v11.1.0</h1>
written partially to disk during the build process. They will be re-indexed when they are complete.
</li>
<li>Update gradle intellij plugin to fix <code>runIde</code> on newer macOS.</li>
<li>
<p>Fix <code>ConcurrentModificationException</code> in Structure View</p>
<p>
Java 9 fixed a bug (
<a href="https://bugs.openjdk.java.net/browse/JDK-8071667" rel="nofollow">
https://bugs.openjdk.java.net/browse/JDK-8071667
</a>) in <code>HashMap</code> where <code>computeIfAbsent</code> did not check for concurrent modifications,
and it turns out that <code>TreeElementList</code> was using concurrent modifications, so it was now broke.
</p>
<p>
Fixed by use <code>get</code> or <code>put</code> if it is absent, so that <code>putNew</code> can ensure that
the <code>CallDefinition</code> is in the <code>TreeElementList</code> before it is added to the
<code>MutableList&lt;TreeElement&gt;</code>, which was the original reason why there was a <code>put</code>
inside of <code>computeIfAbsent</code>, which would have <code>put</code> when the function returned anyway.
</p>
</li>
</ul>
</li>
</ul>
Expand Down

0 comments on commit a9612d9

Please sign in to comment.