File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
src/main/java/io/jenkins/plugins/pipelinegraphview/treescanner Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -96,18 +96,19 @@ private void handleBlockStart(@NonNull FlowNode node) {
9696 }
9797
9898 private void addSeenNodes (FlowNode node ) {
99- if (!seenChildNodes .containsKey (node .getEnclosingId ())) {
100- seenChildNodes .put (node .getEnclosingId (), new ArrayDeque <>());
99+ String enclosingId = node .getEnclosingId ();
100+ if (!seenChildNodes .containsKey (enclosingId )) {
101+ seenChildNodes .put (enclosingId , new ArrayDeque <>());
101102 }
102103 if (isDebugEnabled ) {
103- logger .debug ("Adding {} to seenChildNodes {}" , node .getId (), node . getEnclosingId () );
104+ logger .debug ("Adding {} to seenChildNodes {}" , node .getId (), enclosingId );
104105 }
105- seenChildNodes .get (node . getEnclosingId () ).push (node );
106+ seenChildNodes .get (enclosingId ).push (node );
106107 }
107108
108109 @ CheckForNull
109110 private FlowNode getAfterNode (FlowNode node ) {
110- FlowNode after = null ;
111+ FlowNode after ;
111112 // The after node is the last child of the enclosing node, except for the last node in
112113 // a block, then it's the last node in the enclosing nodes list (likely, this blocks end node).
113114 FlowNode parentStartNode = getFirstEnclosingNode (node );
You can’t perform that action at this time.
0 commit comments