refactor: move fastListOf method out of CollectionTool

This commit is contained in:
金戟 2022-12-15 09:42:02 +08:00
parent 0287d27d85
commit c6e861e5cf
5 changed files with 12 additions and 12 deletions

View File

@ -18,7 +18,7 @@ import static com.alibaba.testable.agent.constant.ByteCodeConst.TYPE_CLASS;
import static com.alibaba.testable.agent.constant.ConstPool.*;
import static com.alibaba.testable.agent.util.MockInvokeUtil.*;
import static com.alibaba.testable.core.constant.ConstPool.CONSTRUCTOR;
import static com.alibaba.testable.core.tool.CollectionTool.fastListOf;
import static com.alibaba.testable.core.util.CollectionUtil.fastListOf;
/**
* @author flin

View File

@ -3,7 +3,7 @@ package com.alibaba.testable.agent.util;
import org.junit.jupiter.api.Test;
import org.objectweb.asm.tree.AnnotationNode;
import static com.alibaba.testable.core.tool.CollectionTool.fastListOf;
import static com.alibaba.testable.core.util.CollectionUtil.fastListOf;
import static org.junit.jupiter.api.Assertions.*;
class AnnotationUtilTest {

View File

@ -41,15 +41,6 @@ public class CollectionTool {
return items;
}
/**
* Create an immutable list
* @param items elements to add
* @return list of the provided items
*/
public static <T> List<T> fastListOf(T... items) {
return Arrays.asList(items);
}
/**
* Create a mutable list
* @param items elements to add

View File

@ -52,4 +52,13 @@ public class CollectionUtil {
return false;
}
/**
* Create an immutable list
* @param items elements to add
* @return list of the provided items
*/
public static <T> List<T> fastListOf(T... items) {
return Arrays.asList(items);
}
}

View File

@ -2,7 +2,7 @@ package com.alibaba.testable.core.util;
import org.junit.jupiter.api.Test;
import static com.alibaba.testable.core.tool.CollectionTool.fastListOf;
import static com.alibaba.testable.core.util.CollectionUtil.fastListOf;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;