From e9a203ef9bce3bf618b38a29042c8bda995ed23e Mon Sep 17 00:00:00 2001 From: emeroad Date: Mon, 21 Nov 2022 18:57:41 +0900 Subject: [PATCH] [#noissue] Remove unused Javassist package --- .../test/javasssit/TestBeforeInterceptor.java | 64 ---- .../test/javasssit/TestBootstrapClass.java | 62 ---- .../pinpoint/test/javasssit/TestClass.java | 67 ----- .../test/javasssit/TestInterceptors.java | 44 --- .../accessor/AccessorInjectionTest.java | 276 ------------------ .../accessor/BindValueTraceValue.java | 29 -- .../accessor/DatabaseInfoTraceValue.java | 28 -- .../javasssit/accessor/IntArrayGetter.java | 25 -- .../javasssit/accessor/IntArraySetter.java | 25 -- .../accessor/IntArrayTraceValue.java | 26 -- .../test/javasssit/accessor/IntGetter.java | 25 -- .../test/javasssit/accessor/IntSetter.java | 25 -- .../javasssit/accessor/IntTraceValue.java | 27 -- .../accessor/IntegerArrayGetter.java | 25 -- .../accessor/IntegerArraySetter.java | 25 -- .../accessor/IntegerArrayTraceValue.java | 26 -- .../javasssit/accessor/ObjectTraceValue.java | 29 -- .../test/javasssit/accessor/StringGetter.java | 25 -- .../mock/ClassHierarchyTestMock.java | 34 --- .../test/javasssit/mock/TestObject.java | 67 ----- .../test/javasssit/mock/TestObject2.java | 42 --- .../test/javasssit/mock/TestObject3.java | 47 --- .../test/javasssit/mock/TestObject4.java | 38 --- .../javasssit/mock/TestObjectNestedClass.java | 87 ------ 24 files changed, 1168 deletions(-) delete mode 100644 profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/TestBeforeInterceptor.java delete mode 100644 profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/TestBootstrapClass.java delete mode 100644 profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/TestClass.java delete mode 100644 profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/TestInterceptors.java delete mode 100644 profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/AccessorInjectionTest.java delete mode 100644 profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/BindValueTraceValue.java delete mode 100644 profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/DatabaseInfoTraceValue.java delete mode 100644 profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/IntArrayGetter.java delete mode 100644 profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/IntArraySetter.java delete mode 100644 profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/IntArrayTraceValue.java delete mode 100644 profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/IntGetter.java delete mode 100644 profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/IntSetter.java delete mode 100644 profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/IntTraceValue.java delete mode 100644 profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/IntegerArrayGetter.java delete mode 100644 profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/IntegerArraySetter.java delete mode 100644 profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/IntegerArrayTraceValue.java delete mode 100644 profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/ObjectTraceValue.java delete mode 100644 profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/StringGetter.java delete mode 100644 profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/mock/ClassHierarchyTestMock.java delete mode 100644 profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/mock/TestObject.java delete mode 100644 profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/mock/TestObject2.java delete mode 100644 profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/mock/TestObject3.java delete mode 100644 profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/mock/TestObject4.java delete mode 100644 profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/mock/TestObjectNestedClass.java diff --git a/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/TestBeforeInterceptor.java b/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/TestBeforeInterceptor.java deleted file mode 100644 index ed468713f718..000000000000 --- a/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/TestBeforeInterceptor.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright 2018 NAVER Corp. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.navercorp.pinpoint.test.javasssit; - -import com.navercorp.pinpoint.bootstrap.interceptor.StaticAroundInterceptor; -import org.apache.logging.log4j.Logger; -import org.apache.logging.log4j.LogManager; - -import java.util.Arrays; - -/** - * @author emeroad - */ -public class TestBeforeInterceptor implements StaticAroundInterceptor { - static { - System.out.println("load TestBeforeInterceptor cl:" + TestBeforeInterceptor.class.getClassLoader()); - } - - private Logger logger = LogManager.getLogger(this.getClass().getName()); - - public int call = 0; - public Object target; - public String className; - public String methodName; - public Object[] args; - - @Override - public void before(Object target, String className, String methodName, String parameterDescription, Object[] args) { - logger.info("BEFORE target:" + toClassName(target) + " " + className + "." + methodName + parameterDescription + " args:" + Arrays.toString(args)); - this.target = target; - this.className = className; - this.methodName = methodName; - this.args = args; - call++; - - TestInterceptors.add(this); - } - - private String toClassName(Object target) { - if (target == null) { - return "null"; - } - return target.getClass().getName(); - } - - @Override - public void after(Object target, String className, String methodName, String parameterDescription, Object[] args, Object result, Throwable throwable) { - - } -} diff --git a/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/TestBootstrapClass.java b/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/TestBootstrapClass.java deleted file mode 100644 index 3fea87698b73..000000000000 --- a/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/TestBootstrapClass.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2014 NAVER Corp. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.navercorp.pinpoint.test.javasssit; - -import java.lang.reflect.Method; - -import org.apache.logging.log4j.Logger; -import org.apache.logging.log4j.LogManager; -import org.junit.jupiter.api.Test; - - -/** - * @author emeroad - */ -@Deprecated -public class TestBootstrapClass { - - private static final String TEST_CLASS_NAME = "com.navercorp.pinpoint.profiler.javaassist.DynamicCreateTest"; - - private final Logger logger = LogManager.getLogger(this.getClass()); - - - @Test - public void testJdkClassClassLoader() { - - ClassLoader systemClassLoader = ClassLoader.getSystemClassLoader(); - ClassLoader parent = systemClassLoader.getParent(); - logger.debug("parent:{}", parent); - logger.debug("pparent:{}", parent.getParent()); - - logger.debug("{}", String.class.getClassLoader()); - logger.debug("{}", TestBootstrapClass.class.getClassLoader()); - - } - - @Test - public void testReflection() throws Exception { - ClassLoader contextClassLoader = java.lang.Thread.currentThread().getContextClassLoader(); - Class interceptorRegistry = contextClassLoader.loadClass("com.navercorp.pinpoint.bootstrap.interceptor.registry.GlobalInterceptorRegistry"); - Method getInterceptorMethod = interceptorRegistry.getMethod("getInterceptor", int.class); - Object interceptor = getInterceptorMethod.invoke(interceptorRegistry, 1); - - Method beforeMethod = interceptor.getClass().getMethod("before", java.lang.Object.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Object[].class); - beforeMethod.invoke(interceptor, null, null, null, null, null); - } - -} - diff --git a/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/TestClass.java b/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/TestClass.java deleted file mode 100644 index b97f9788e3e2..000000000000 --- a/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/TestClass.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright 2014 NAVER Corp. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.navercorp.pinpoint.test.javasssit; - -import java.util.List; - -/** - * @author emeroad - */ -public class TestClass { - private int a; - private List b; - private String[] stringArray; - - - public int getA() { - return a; - } - - public void setA(int a) { - this.a = a; - } - - public int inlineClass(final int a) { - Comparable c = new Comparable() { - @Override - public int compareTo(Object o) { - return a; - } - }; - return c.compareTo(null); - } - - private class InnerClass { - private String str; - - public String getStr() { - return str; - } - - public void setStr(String str) { - this.str = str; - } - } - - public void setB(List b) { - this.b = b; - } - - public void setStringArray(String[] stringArray) { - this.stringArray = stringArray; - } -} diff --git a/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/TestInterceptors.java b/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/TestInterceptors.java deleted file mode 100644 index a094c8359a65..000000000000 --- a/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/TestInterceptors.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2016 NAVER Corp. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -package com.navercorp.pinpoint.test.javasssit; - -import com.navercorp.pinpoint.bootstrap.interceptor.Interceptor; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -/** - * @author Jongho Moon - * - */ -public class TestInterceptors { - - private static final List interceptors = Collections.synchronizedList(new ArrayList()); - - public static void clear() { - interceptors.clear(); - } - - public static void add(Interceptor interceptor) { - interceptors.add(interceptor); - } - - public static Interceptor get(int index) { - return interceptors.get(index); - } -} diff --git a/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/AccessorInjectionTest.java b/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/AccessorInjectionTest.java deleted file mode 100644 index 00b9489c3cd5..000000000000 --- a/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/AccessorInjectionTest.java +++ /dev/null @@ -1,276 +0,0 @@ -/* - * Copyright 2016 NAVER Corp. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package com.navercorp.pinpoint.test.javasssit.accessor; - -import com.navercorp.pinpoint.bootstrap.config.DefaultProfilerConfig; -import com.navercorp.pinpoint.bootstrap.context.DatabaseInfo; -import com.navercorp.pinpoint.bootstrap.instrument.InstrumentClass; -import com.navercorp.pinpoint.bootstrap.instrument.InstrumentException; -import com.navercorp.pinpoint.bootstrap.instrument.Instrumentor; -import com.navercorp.pinpoint.bootstrap.instrument.transformer.TransformCallback; -import com.navercorp.pinpoint.bootstrap.logging.PLoggerFactory; -import com.navercorp.pinpoint.bootstrap.plugin.jdbc.UnKnownDatabaseInfo; -import com.navercorp.pinpoint.profiler.context.module.DefaultApplicationContext; -import com.navercorp.pinpoint.profiler.logging.Log4j2Binder; -import com.navercorp.pinpoint.test.MockApplicationContextFactory; -import com.navercorp.pinpoint.test.classloader.TestClassLoader; -import com.navercorp.pinpoint.test.javasssit.TestBeforeInterceptor; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; -import org.apache.logging.log4j.spi.LoggerContext; -import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -import java.lang.reflect.Method; -import java.security.ProtectionDomain; - -/** - * @author Woonduk Kang(emeroad) - */ -@Deprecated -public class AccessorInjectionTest { - - private final Logger logger = LogManager.getLogger(this.getClass()); - - private DefaultApplicationContext applicationContext; - - private TestClassLoader getTestClassLoader() { - LoggerContext context = LogManager.getContext(); - PLoggerFactory.initialize(new Log4j2Binder(context)); - - DefaultProfilerConfig profilerConfig = new DefaultProfilerConfig(); - - MockApplicationContextFactory factory = new MockApplicationContextFactory(); - this.applicationContext = factory.build(profilerConfig); - this.applicationContext.start(); - - TestClassLoader testClassLoader = new TestClassLoader(applicationContext); - testClassLoader.initialize(); - return testClassLoader; - } - - @AfterEach - public void tearDown() { - if (applicationContext != null) { - applicationContext.close(); - } - } - - @Test - public void addTraceValue() throws Exception { - final TestClassLoader loader = getTestClassLoader(); - final String javassistClassName = "com.navercorp.pinpoint.test.javasssit.mock.TestObject"; - - loader.addTransformer(javassistClassName, new TransformCallback() { - - @Override - public byte[] doInTransform(Instrumentor instrumentor, ClassLoader loader, String className, Class classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException { - try { - logger.info("modify cl:{}", loader); - - InstrumentClass aClass = instrumentor.getInstrumentClass(loader, javassistClassName, classfileBuffer); - - aClass.addField(ObjectTraceValue.class); - aClass.addField(IntTraceValue.class); - aClass.addField(IntArrayTraceValue.class); - aClass.addField(IntegerArrayTraceValue.class); - aClass.addField(DatabaseInfoTraceValue.class); - aClass.addField(BindValueTraceValue.class); - - String methodName = "callA"; - aClass.getDeclaredMethod(methodName).addInterceptor(TestBeforeInterceptor.class); - return aClass.toBytecode(); - } catch (InstrumentException e) { - e.printStackTrace(); - throw new RuntimeException(e.getMessage(), e); - } - } - }); - - Class testObjectClazz = loader.loadClass(javassistClassName); - final String methodName = "callA"; - logger.info("class:{}", testObjectClazz.toString()); - final Object testObject = testObjectClazz.newInstance(); - Method callA = testObjectClazz.getMethod(methodName); - callA.invoke(testObject); - - Class objectTraceValue = loader.loadClass(ObjectTraceValue.class.getName()); - Assertions.assertTrue(objectTraceValue.isInstance(testObject), "ObjectTraceValue implements fail"); - objectTraceValue.getMethod("_$PINPOINT$_setTraceObject", Object.class).invoke(testObject, "a"); - Object get = objectTraceValue.getMethod("_$PINPOINT$_getTraceObject").invoke(testObject); - Assertions.assertEquals("a", get); - - Class intTraceValue = loader.loadClass(IntTraceValue.class.getName()); - Assertions.assertTrue(intTraceValue.isInstance(testObject), "IntTraceValue implements fail"); - intTraceValue.getMethod("_$PINPOINT$_setTraceInt", int.class).invoke(testObject, 1); - int a = (Integer) intTraceValue.getMethod("_$PINPOINT$_getTraceInt").invoke(testObject); - Assertions.assertEquals(1, a); - - Class intArrayTraceValue = loader.loadClass(IntArrayTraceValue.class.getName()); - Assertions.assertTrue(intArrayTraceValue.isInstance(testObject), "IntArrayTraceValue implements fail"); - int[] expectedInts = {1, 2, 3}; - intArrayTraceValue.getMethod("_$PINPOINT$_setTraceIntArray", int[].class).invoke(testObject, expectedInts); - int[] ints = (int[]) intArrayTraceValue.getMethod("_$PINPOINT$_getTraceIntArray").invoke(testObject); - Assertions.assertEquals(expectedInts, ints); - - Class integerArrayTraceValue = loader.loadClass(IntegerArrayTraceValue.class.getName()); - Assertions.assertTrue(integerArrayTraceValue.isInstance(testObject), "IntegerArrayTraceValue implements fail"); - Integer[] expectedIntegers = {1, 2}; - // wrap due to vararg expansion - Object[] wrappedExpectedIntegers = new Object[]{expectedIntegers}; - integerArrayTraceValue.getMethod("_$PINPOINT$_setTraceIntegerArray", Integer[].class).invoke(testObject, wrappedExpectedIntegers); - Integer[] integers = (Integer[]) integerArrayTraceValue.getMethod("_$PINPOINT$_getTraceIntegerArray").invoke(testObject); - Assertions.assertArrayEquals(expectedIntegers, integers); - - Class databaseTraceValue = loader.loadClass(DatabaseInfoTraceValue.class.getName()); - Assertions.assertTrue(databaseTraceValue.isInstance(testObject), "DatabaseInfoTraceValue implements fail"); - databaseTraceValue.getMethod("_$PINPOINT$_setTraceDatabaseInfo", DatabaseInfo.class).invoke(testObject, UnKnownDatabaseInfo.INSTANCE); - Object databaseInfo = databaseTraceValue.getMethod("_$PINPOINT$_getTraceDatabaseInfo").invoke(testObject); - Assertions.assertSame(UnKnownDatabaseInfo.INSTANCE, databaseInfo); - } - - @Test - public void testAddGetter() throws Exception { - final TestClassLoader loader = getTestClassLoader(); - final String targetClassName = "com.navercorp.pinpoint.test.javasssit.mock.TestObject3"; - - - loader.addTransformer(targetClassName, new TransformCallback() { - - @Override - public byte[] doInTransform(Instrumentor instrumentor, ClassLoader classLoader, String className, Class classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException { - try { - logger.info("modify cl:{}", classLoader); - InstrumentClass aClass = instrumentor.getInstrumentClass(classLoader, className, classfileBuffer); - - aClass.addGetter(StringGetter.class, "value"); - aClass.addGetter(IntGetter.class, "intValue"); - aClass.addGetter(IntArrayGetter.class, "intValues"); - aClass.addGetter(IntegerArrayGetter.class, "integerValues"); - - return aClass.toBytecode(); - } catch (InstrumentException e) { - throw new RuntimeException(e.getMessage(), e); - } - } - }); - - - Object testObject = loader.loadClass(targetClassName).newInstance(); - - Class stringGetter = loader.loadClass(StringGetter.class.getName()); - Class intGetter = loader.loadClass(IntGetter.class.getName()); - Class intsGetter = loader.loadClass(IntArrayGetter.class.getName()); - Class integersGetter = loader.loadClass(IntegerArrayGetter.class.getName()); - - Assertions.assertTrue(stringGetter.isInstance(testObject)); - Assertions.assertTrue(intGetter.isInstance(testObject)); - Assertions.assertTrue(intsGetter.isInstance(testObject)); - Assertions.assertTrue(integersGetter.isInstance(testObject)); - - String value = "hehe"; - int intValue = 99; - int[] intValues = {99, 100}; - Integer[] integerValues = {99, 100}; - - Method method = testObject.getClass().getMethod("setValue", String.class); - method.invoke(testObject, value); - - Method getString = stringGetter.getMethod("_$PINPOINT$_getString"); - Assertions.assertEquals(value, getString.invoke(testObject)); - - Method setIntValue = testObject.getClass().getMethod("setIntValue", int.class); - setIntValue.invoke(testObject, intValue); - - Method getInt = intGetter.getMethod("_$PINPOINT$_getInt"); - Assertions.assertEquals(intValue, getInt.invoke(testObject)); - - Method setIntValues = testObject.getClass().getMethod("setIntValues", int[].class); - setIntValues.invoke(testObject, intValues); - - Method getIntValues = intsGetter.getMethod("_$PINPOINT$_getIntArray"); - Assertions.assertEquals(intValues, getIntValues.invoke(testObject)); - - Method setIntegerValues = testObject.getClass().getMethod("setIntegerValues", Integer[].class); - // wrap due to vararg expansion - Object[] wrappedIntegerValues = new Object[]{integerValues}; - setIntegerValues.invoke(testObject, wrappedIntegerValues); - - Method getIntegerValues = integersGetter.getMethod("_$PINPOINT$_getIntegerArray"); - Assertions.assertEquals(integerValues, getIntegerValues.invoke(testObject)); - - } - - @Test - public void testAddSetter() throws Exception { - final TestClassLoader loader = getTestClassLoader(); - final String targetClassName = "com.navercorp.pinpoint.test.javasssit.mock.TestObject4"; - - loader.addTransformer(targetClassName, new TransformCallback() { - @Override - public byte[] doInTransform(Instrumentor instrumentor, ClassLoader classLoader, String className, Class classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException { - try { - logger.info("modify cl:{}", classLoader); - InstrumentClass testClass = instrumentor.getInstrumentClass(classLoader, className, classfileBuffer); - - testClass.addSetter(IntSetter.class, "intValue"); - testClass.addSetter(IntArraySetter.class, "intValues"); - testClass.addSetter(IntegerArraySetter.class, "integerValues"); - - return testClass.toBytecode(); - } catch (InstrumentException e) { - throw new RuntimeException(e.getMessage(), e); - } - } - }); - - - Object testObject = loader.loadClass(targetClassName).newInstance(); - - Class intSetter = loader.loadClass(IntSetter.class.getName()); - Class intsSetter = loader.loadClass(IntArraySetter.class.getName()); - Class integersSetter = loader.loadClass(IntegerArraySetter.class.getName()); - - Assertions.assertTrue(intSetter.isInstance(testObject)); - Assertions.assertTrue(intsSetter.isInstance(testObject)); - Assertions.assertTrue(integersSetter.isInstance(testObject)); - - int intValue = 99; - int[] intValues = {99, 100}; - Integer[] integerValues = {99, 100}; - - Method setInt = intSetter.getMethod("_$PINPOINT$_setInt", int.class); - setInt.invoke(testObject, intValue); - Method getInt = testObject.getClass().getMethod("getIntValue"); - Assertions.assertEquals(intValue, getInt.invoke(testObject)); - - Method setInts = intsSetter.getMethod("_$PINPOINT$_setIntArray", int[].class); - setInts.invoke(testObject, intValues); - Method getInts = testObject.getClass().getMethod("getIntValues"); - Assertions.assertEquals(intValues, getInts.invoke(testObject)); - - Method setIntegers = integersSetter.getMethod("_$PINPOINT$_setIntegerArray", Integer[].class); - // wrap due to vararg expansion - Object[] wrappedIntegerValues = new Object[]{integerValues}; - setIntegers.invoke(testObject, wrappedIntegerValues); - Method getIntegers = testObject.getClass().getMethod("getIntegerValues"); - Assertions.assertEquals(integerValues, getIntegers.invoke(testObject)); - } - -} diff --git a/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/BindValueTraceValue.java b/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/BindValueTraceValue.java deleted file mode 100644 index 3fdc88ded28f..000000000000 --- a/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/BindValueTraceValue.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2016 NAVER Corp. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package com.navercorp.pinpoint.test.javasssit.accessor; - - -import java.util.Map; - -/** - * @author emeroad - */ -public interface BindValueTraceValue { - void _$PINPOINT$_setTraceBindValue(Map value); - Map _$PINPOINT$_getTraceBindValue(); -} diff --git a/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/DatabaseInfoTraceValue.java b/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/DatabaseInfoTraceValue.java deleted file mode 100644 index ed1238edd130..000000000000 --- a/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/DatabaseInfoTraceValue.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2016 NAVER Corp. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package com.navercorp.pinpoint.test.javasssit.accessor; - -import com.navercorp.pinpoint.bootstrap.context.DatabaseInfo; - -/** - * @author emeroad - */ -public interface DatabaseInfoTraceValue { - void _$PINPOINT$_setTraceDatabaseInfo(DatabaseInfo value); - DatabaseInfo _$PINPOINT$_getTraceDatabaseInfo(); -} diff --git a/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/IntArrayGetter.java b/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/IntArrayGetter.java deleted file mode 100644 index e5da5349bcd9..000000000000 --- a/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/IntArrayGetter.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2016 NAVER Corp. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package com.navercorp.pinpoint.test.javasssit.accessor; - -/** - * @author HyunGil Jeong - */ -public interface IntArrayGetter { - int[] _$PINPOINT$_getIntArray(); -} diff --git a/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/IntArraySetter.java b/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/IntArraySetter.java deleted file mode 100644 index 696f5ba75838..000000000000 --- a/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/IntArraySetter.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2016 NAVER Corp. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package com.navercorp.pinpoint.test.javasssit.accessor; - -/** - * @author HyunGil Jeong - */ -public interface IntArraySetter { - void _$PINPOINT$_setIntArray(int[] integers); -} diff --git a/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/IntArrayTraceValue.java b/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/IntArrayTraceValue.java deleted file mode 100644 index 97529bd89d2f..000000000000 --- a/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/IntArrayTraceValue.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2016 NAVER Corp. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package com.navercorp.pinpoint.test.javasssit.accessor; - -/** - * @author HyunGil Jeong - */ -public interface IntArrayTraceValue { - void _$PINPOINT$_setTraceIntArray(int[] values); - int[] _$PINPOINT$_getTraceIntArray(); -} diff --git a/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/IntGetter.java b/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/IntGetter.java deleted file mode 100644 index 4e967151bd34..000000000000 --- a/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/IntGetter.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2016 NAVER Corp. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -package com.navercorp.pinpoint.test.javasssit.accessor; - -/** - * @author Jongho Moon - * - */ -public interface IntGetter { - int _$PINPOINT$_getInt(); -} diff --git a/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/IntSetter.java b/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/IntSetter.java deleted file mode 100644 index 4891b1c69242..000000000000 --- a/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/IntSetter.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2016 NAVER Corp. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package com.navercorp.pinpoint.test.javasssit.accessor; - -/** - * @author HyunGil Jeong - */ -public interface IntSetter { - void _$PINPOINT$_setInt(int integer); -} diff --git a/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/IntTraceValue.java b/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/IntTraceValue.java deleted file mode 100644 index 66f7685c7a20..000000000000 --- a/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/IntTraceValue.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2016 NAVER Corp. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package com.navercorp.pinpoint.test.javasssit.accessor; - - -/** - * @author emeroad - */ -public interface IntTraceValue { - void _$PINPOINT$_setTraceInt(int value); - int _$PINPOINT$_getTraceInt(); -} diff --git a/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/IntegerArrayGetter.java b/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/IntegerArrayGetter.java deleted file mode 100644 index 80a0ab3a6135..000000000000 --- a/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/IntegerArrayGetter.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2016 NAVER Corp. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package com.navercorp.pinpoint.test.javasssit.accessor; - -/** - * @author HyunGil Jeong - */ -public interface IntegerArrayGetter { - Integer[] _$PINPOINT$_getIntegerArray(); -} diff --git a/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/IntegerArraySetter.java b/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/IntegerArraySetter.java deleted file mode 100644 index 0e2af3b72c7f..000000000000 --- a/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/IntegerArraySetter.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2016 NAVER Corp. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package com.navercorp.pinpoint.test.javasssit.accessor; - -/** - * @author HyunGil Jeong - */ -public interface IntegerArraySetter { - void _$PINPOINT$_setIntegerArray(Integer[] integers); -} diff --git a/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/IntegerArrayTraceValue.java b/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/IntegerArrayTraceValue.java deleted file mode 100644 index fbba44947a03..000000000000 --- a/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/IntegerArrayTraceValue.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2016 NAVER Corp. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package com.navercorp.pinpoint.test.javasssit.accessor; - -/** - * @author HyunGil Jeong - */ -public interface IntegerArrayTraceValue { - void _$PINPOINT$_setTraceIntegerArray(Integer[] values); - Integer[] _$PINPOINT$_getTraceIntegerArray(); -} diff --git a/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/ObjectTraceValue.java b/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/ObjectTraceValue.java deleted file mode 100644 index 12cce89c0251..000000000000 --- a/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/ObjectTraceValue.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2016 NAVER Corp. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package com.navercorp.pinpoint.test.javasssit.accessor; - - -/** - * @author emeroad - */ -public interface ObjectTraceValue { - - void _$PINPOINT$_setTraceObject(Object value); - - Object _$PINPOINT$_getTraceObject(); -} diff --git a/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/StringGetter.java b/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/StringGetter.java deleted file mode 100644 index a31b83506098..000000000000 --- a/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/accessor/StringGetter.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2016 NAVER Corp. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -package com.navercorp.pinpoint.test.javasssit.accessor; - -/** - * @author Jongho Moon - * - */ -public interface StringGetter { - String _$PINPOINT$_getString(); -} diff --git a/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/mock/ClassHierarchyTestMock.java b/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/mock/ClassHierarchyTestMock.java deleted file mode 100644 index de5f360f9ffd..000000000000 --- a/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/mock/ClassHierarchyTestMock.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2014 NAVER Corp. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.navercorp.pinpoint.test.javasssit.mock; - -import java.util.HashMap; - -/** - * @author emeroad - */ -public class ClassHierarchyTestMock extends HashMap implements Runnable, Comparable { - @Override - public int compareTo(Object o) { - return 0; - } - - @Override - public void run() { - - } -} diff --git a/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/mock/TestObject.java b/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/mock/TestObject.java deleted file mode 100644 index 46f8344d7570..000000000000 --- a/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/mock/TestObject.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright 2014 NAVER Corp. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.navercorp.pinpoint.test.javasssit.mock; - -import org.apache.logging.log4j.Logger; -import org.apache.logging.log4j.LogManager; - -/** - * @author emeroad - */ -public class TestObject { - private Logger logger = LogManager.getLogger(this.getClass().getName()); - - private int callA; - private boolean isthrow = false; - private int returnCode = 1; - - public void setIsthrow(boolean isthrow) { - this.isthrow = isthrow; - } - - public void setReturnCode(int returnCode) { - this.returnCode = returnCode; - } - - public int callA() { - logger.info("callA"); - int i = callA++; - if (isthrow) { - throw new RuntimeException("ddd"); - } - if(returnCode == 1) { - return 1; - } if (returnCode == 10){ - return -1; - } - return 0; - } - - public static void before() { - - } - public static void after() { - } - public static void callCatch() { - - } - - public String hello(String a) { - return "a"; - } - -} diff --git a/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/mock/TestObject2.java b/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/mock/TestObject2.java deleted file mode 100644 index 4c51b5ea3b79..000000000000 --- a/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/mock/TestObject2.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2014 NAVER Corp. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.navercorp.pinpoint.test.javasssit.mock; - -import org.apache.logging.log4j.Logger; -import org.apache.logging.log4j.LogManager; - -/** - * @author emeroad - */ -public class TestObject2 { - private Logger logger = LogManager.getLogger(this.getClass().getName()); - - public int callA; - public int callB; - - public int callA(){ - logger.info("callA"); - int i = callA++; - return i; - } - - public void callB() { - callB++; - } - - -} diff --git a/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/mock/TestObject3.java b/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/mock/TestObject3.java deleted file mode 100644 index cc724da426b2..000000000000 --- a/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/mock/TestObject3.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2014 NAVER Corp. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.navercorp.pinpoint.test.javasssit.mock; - -/** - * @author Jongho Moon - * - */ -public class TestObject3 { - private String value; - private int intValue; - private int[] intValues; - private Integer[] integerValues; - - public void setValue(String value) { - this.value = value; - } - - public void setIntValue(int value) { - this.intValue = value; - } - - public void setIntValues(int[] values) { - this.intValues = values; - } - - public void setIntegerValues(Integer[] values) { - this.integerValues = values; - } - - @Override - public String toString() { - return value; - } -} diff --git a/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/mock/TestObject4.java b/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/mock/TestObject4.java deleted file mode 100644 index d401defac538..000000000000 --- a/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/mock/TestObject4.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2016 Naver Corp. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.navercorp.pinpoint.test.javasssit.mock; - -/** - * @author HyunGil Jeong - */ -public class TestObject4 { - private int intValue; - private int[] intValues; - private Integer[] integerValues; - - public int getIntValue() { - return this.intValue; - } - - public int[] getIntValues() { - return this.intValues; - } - - public Integer[] getIntegerValues() { - return this.integerValues; - } -} diff --git a/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/mock/TestObjectNestedClass.java b/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/mock/TestObjectNestedClass.java deleted file mode 100644 index a3f355ff11a2..000000000000 --- a/profiler-test/src/test/java/com/navercorp/pinpoint/test/javasssit/mock/TestObjectNestedClass.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright 2014 NAVER Corp. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.navercorp.pinpoint.test.javasssit.mock; - -import java.util.concurrent.Callable; - -/** - * @author jaehong.kim - * - */ -public class TestObjectNestedClass { - - public void annonymousInnerClass() { - new Callable() { - - @Override - public Object call() throws Exception { - return null; - } - }; - - new Runnable() { - public void run() { - } - }; - } - - public void annonymousInnerClass2() { - new Callable() { - - @Override - public Object call() throws Exception { - return null; - } - }; - - new Runnable() { - public void run() { - } - }; - } - - - public void instanceInnerClass() { - new InstanceInner(); - } - - class InstanceInner {} - - - public void localInnerClass() { - class LocalInner {} - - new LocalInner(); - } - - public void localInnerClass2() { - class LocalInner {} - - new LocalInner(); - } - - public void staticNestedClass() { - new StaticNested(); - } - - static class StaticNested{} - - - public void enclosingMethod(String s, int i) { - class LocalInner {} - - new LocalInner(); - } -}