Skip to content

Commit

Permalink
fix: concurrent access may cause an java.lang.ClassCastException in J…
Browse files Browse the repository at this point in the history
…NodeCache (PR #864)
  • Loading branch information
jpstotz authored Feb 23, 2020
1 parent e444ecb commit 4520747
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jadx-gui/src/main/java/jadx/gui/utils/JNodeCache.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package jadx.gui.utils;

import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

import jadx.api.JavaClass;
import jadx.api.JavaField;
Expand All @@ -15,7 +15,7 @@

public class JNodeCache {

private final Map<JavaNode, JNode> cache = new HashMap<>();
private final Map<JavaNode, JNode> cache = new ConcurrentHashMap<>();

public JNode makeFrom(JavaNode javaNode) {
if (javaNode == null) {
Expand Down

0 comments on commit 4520747

Please sign in to comment.