mirror of
https://github.com/alibaba/testable-mock.git
synced 2025-03-29 21:51:08 +08:00
refactor: move fastListOf method out of CollectionTool
This commit is contained in:
parent
0287d27d85
commit
c6e861e5cf
@ -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.constant.ConstPool.*;
|
||||||
import static com.alibaba.testable.agent.util.MockInvokeUtil.*;
|
import static com.alibaba.testable.agent.util.MockInvokeUtil.*;
|
||||||
import static com.alibaba.testable.core.constant.ConstPool.CONSTRUCTOR;
|
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
|
* @author flin
|
||||||
|
@ -3,7 +3,7 @@ package com.alibaba.testable.agent.util;
|
|||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.objectweb.asm.tree.AnnotationNode;
|
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.*;
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
|
||||||
class AnnotationUtilTest {
|
class AnnotationUtilTest {
|
||||||
|
@ -41,15 +41,6 @@ public class CollectionTool {
|
|||||||
return items;
|
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
|
* Create a mutable list
|
||||||
* @param items elements to add
|
* @param items elements to add
|
||||||
|
@ -52,4 +52,13 @@ public class CollectionUtil {
|
|||||||
return false;
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@ package com.alibaba.testable.core.util;
|
|||||||
|
|
||||||
import org.junit.jupiter.api.Test;
|
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.assertFalse;
|
||||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user