Skip to content

Commit

Permalink
Avoid using old synchronized java.util.Stack
Browse files Browse the repository at this point in the history
Use modern ArrayDeque instead
  • Loading branch information
turbanoff authored and mkarg committed Oct 3, 2024
1 parent 362043c commit 5297478
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jaxrs-api/src/main/java/jakarta/ws/rs/core/GenericType.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.lang.reflect.TypeVariable;
import java.util.ArrayDeque;
import java.util.Arrays;
import java.util.Stack;

/**
* Represents a generic message entity type {@code T}.
Expand Down Expand Up @@ -198,7 +198,7 @@ private static Class getArrayClass(final Class c) {
*/
static Type getTypeArgument(final Class<?> clazz, final Class<?> baseClass) {
// collect superclasses
Stack<Type> superclasses = new Stack<Type>();
ArrayDeque<Type> superclasses = new ArrayDeque<>();
Type currentType;
Class<?> currentClass = clazz;
do {
Expand Down

0 comments on commit 5297478

Please sign in to comment.