Skip to content

Commit 41b976c

Browse files
committed
Replace a leftover LinkedList
1 parent ba2c4a3 commit 41b976c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/java/com/fasterxml/jackson/databind/util/ClassUtil.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,15 @@ public static List<Class<?>> findRawSuperTypes(Class<?> cls, Class<?> endBefore,
8282
* Method for finding all super classes (but not super interfaces) of given class,
8383
* starting with the immediate super class and ending in the most distant one.
8484
* Class itself is included if <code>addClassItself</code> is true.
85+
*<p>
86+
* NOTE: mostly/only called to resolve mix-ins as that's where we do not care
87+
* about fully-resolved types, just associated annotations.
8588
*
8689
* @since 2.7
8790
*/
8891
public static List<Class<?>> findSuperClasses(Class<?> cls, Class<?> endBefore,
8992
boolean addClassItself) {
90-
List<Class<?>> result = new LinkedList<Class<?>>();
93+
List<Class<?>> result = new ArrayList<Class<?>>(8);
9194
if ((cls != null) && (cls != endBefore)) {
9295
if (addClassItself) {
9396
result.add(cls);

0 commit comments

Comments
 (0)