From e6806d914332cd52a9e2715defe13d9d83efe5a5 Mon Sep 17 00:00:00 2001 From: forax Date: Wed, 4 Oct 2017 15:28:32 +0200 Subject: [PATCH] data() return ArrayList instead of List and Enum.values() return a fresh array at each call so it should be call once --- test/conform/org/objectweb/asm/test/AsmTest.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/conform/org/objectweb/asm/test/AsmTest.java b/test/conform/org/objectweb/asm/test/AsmTest.java index 2d4fe3976..f41e36d65 100644 --- a/test/conform/org/objectweb/asm/test/AsmTest.java +++ b/test/conform/org/objectweb/asm/test/AsmTest.java @@ -40,6 +40,7 @@ import java.lang.reflect.Modifier; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.util.ArrayList; +import java.util.List; import org.junit.Rule; import org.junit.rules.ExpectedException; @@ -258,10 +259,11 @@ public abstract class AsmTest { * @return all the possible (precompiledClass, api) pairs, for all the precompiled classes and all * the given ASM API versions. */ - public static ArrayList data(Api... apis) { + public static List data(Api... apis) { + PrecompiledClass[] values = PrecompiledClass.values(); ArrayList result = new ArrayList(); for (Api api : apis) { - for (PrecompiledClass precompiledClass : PrecompiledClass.values()) { + for (PrecompiledClass precompiledClass : values) { result.add(new Object[] {precompiledClass, api}); } } -- GitLab