From c4a1c61fe30b64dafe0166174ca49d93275cb6ca Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Thu, 3 Feb 2022 12:51:35 +0100 Subject: [PATCH] [scala] Fix PMD dogfood issues --- .../net/sourceforge/pmd/lang/scala/ast/ScalaTreeBuilder.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pmd-scala-modules/pmd-scala-common/src/main/java/net/sourceforge/pmd/lang/scala/ast/ScalaTreeBuilder.java b/pmd-scala-modules/pmd-scala-common/src/main/java/net/sourceforge/pmd/lang/scala/ast/ScalaTreeBuilder.java index 32a704d91f..39f4f09301 100644 --- a/pmd-scala-modules/pmd-scala-common/src/main/java/net/sourceforge/pmd/lang/scala/ast/ScalaTreeBuilder.java +++ b/pmd-scala-modules/pmd-scala-common/src/main/java/net/sourceforge/pmd/lang/scala/ast/ScalaTreeBuilder.java @@ -6,9 +6,10 @@ package net.sourceforge.pmd.lang.scala.ast; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; +import java.util.ArrayDeque; +import java.util.Deque; import java.util.HashMap; import java.util.Map; -import java.util.Stack; import scala.meta.Case; import scala.meta.Ctor; @@ -171,7 +172,7 @@ class ScalaTreeBuilder { } // The nodes having children built. - private final Stack> nodes = new Stack<>(); + private final Deque> nodes = new ArrayDeque<>(); private static void register(Class nodeType, Class> nodeAdapterType) {