Skip to content

Commit f9b50da

Browse files
committed
Use ConcurrentHashMap
1 parent 3859653 commit f9b50da

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/org/jenkinsci/plugins/workflow/graph/StandardGraphLookupView.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import java.util.Collections;
1414
import java.util.HashMap;
1515
import java.util.List;
16+
import java.util.concurrent.ConcurrentHashMap;
1617

1718
/**
1819
* Provides overall insight into the structure of a flow graph... but with limited visibility so we can change implementation.
@@ -25,10 +26,10 @@ public final class StandardGraphLookupView implements GraphLookupView, GraphList
2526
static final String INCOMPLETE = "";
2627

2728
/** Map the blockStartNode to its endNode, to accellerate a range of operations */
28-
HashMap<String, String> blockStartToEnd = new HashMap<>();
29+
ConcurrentHashMap<String, String> blockStartToEnd = new ConcurrentHashMap<>();
2930

3031
/** Map a node to its nearest enclosing block */
31-
HashMap<String, String> nearestEnclosingBlock = new HashMap<>();
32+
ConcurrentHashMap<String, String> nearestEnclosingBlock = new ConcurrentHashMap<>();
3233

3334
public void clearCache() {
3435
blockStartToEnd.clear();

0 commit comments

Comments
 (0)