aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/testproxy
diff options
context:
space:
mode:
authorChristian Melchior <christian@ilios.dk>2017-11-12 15:37:15 +0100
committerChristian Melchior <christian@ilios.dk>2017-11-12 15:37:15 +0100
commit215a61f3a0a1d2794df51611218068ab09a90d56 (patch)
tree7309f91e448e346a26d7f339fbd84464402d9406 /src/test/testproxy
parentf4769c7ad702fa529a790106ea5c318a7af5c7b7 (diff)
parente1f0bba5de4dc03a9debfab333683f07cfbcb594 (diff)
downloadjavassist-215a61f3a0a1d2794df51611218068ab09a90d56.tar.gz
javassist-215a61f3a0a1d2794df51611218068ab09a90d56.zip
Merge branch 'master' into cm/bug/classpath-close
# Conflicts: # pom.xml # src/main/javassist/ByteArrayClassPath.java # src/main/javassist/ClassClassPath.java # src/main/javassist/ClassPoolTail.java # src/main/javassist/LoaderClassPath.java # src/main/javassist/URLClassPath.java
Diffstat (limited to 'src/test/testproxy')
-rw-r--r--src/test/testproxy/ProxyFactoryPerformanceTest.java5
-rw-r--r--src/test/testproxy/ProxyTester.java14
-rw-r--r--src/test/testproxy/Target2.java1
-rw-r--r--src/test/testproxy/sub/TargetSuper.java1
4 files changed, 20 insertions, 1 deletions
diff --git a/src/test/testproxy/ProxyFactoryPerformanceTest.java b/src/test/testproxy/ProxyFactoryPerformanceTest.java
index 55bc7849..df8bd8fc 100644
--- a/src/test/testproxy/ProxyFactoryPerformanceTest.java
+++ b/src/test/testproxy/ProxyFactoryPerformanceTest.java
@@ -17,6 +17,7 @@ import junit.framework.TestCase;
import junit.framework.TestSuite;
import junit.textui.TestRunner;
+@SuppressWarnings({"rawtypes","unchecked", "unused"})
public class ProxyFactoryPerformanceTest extends TestCase {
public static final int COUNT = 100;
@@ -84,6 +85,7 @@ public class ProxyFactoryPerformanceTest extends TestCase {
}
}
+@SuppressWarnings({"rawtypes","unused"})
class ProxyMaker extends Thread implements MethodHandler {
private static final MethodFilter FINALIZE_FILTER = new MethodFilter() {
public boolean isHandled(Method m) {
@@ -163,6 +165,9 @@ class EnhancerUser extends Thread implements InvocationHandler {
*/
class SampleBean implements Serializable {
+ /** default serialVersionUID */
+ private static final long serialVersionUID = 1L;
+
long oid;
int version;
diff --git a/src/test/testproxy/ProxyTester.java b/src/test/testproxy/ProxyTester.java
index f325997d..64712ef3 100644
--- a/src/test/testproxy/ProxyTester.java
+++ b/src/test/testproxy/ProxyTester.java
@@ -3,16 +3,19 @@ package testproxy;
import java.lang.reflect.Method;
import java.lang.reflect.Constructor;
import java.lang.reflect.Modifier;
+
+import org.junit.Assert;
+
import java.lang.reflect.InvocationTargetException;
import javassist.util.proxy.ProxyFactory;
import javassist.util.proxy.MethodFilter;
import javassist.util.proxy.MethodHandler;
import javassist.util.proxy.ProxyObject;
import javassist.util.proxy.Proxy;
-import junit.framework.Assert;
import junit.framework.TestCase;
import java.io.*;
+@SuppressWarnings({"unchecked", "rawtypes","unused"})
public class ProxyTester extends TestCase {
public ProxyTester(String s) {
super(s);
@@ -398,6 +401,9 @@ public class ProxyTester extends TestCase {
}
public static class ReadWriteData implements Serializable {
+ /** default serialVersionUID */
+ private static final long serialVersionUID = 1L;
+
public int foo() { return 4; }
}
@@ -416,10 +422,16 @@ public class ProxyTester extends TestCase {
}
public static class WriteReplace implements Serializable {
+ /** default serialVersionUID */
+ private static final long serialVersionUID = 1L;
+
public Object writeReplace() { return this; }
}
public static class WriteReplace2 implements Serializable {
+ /** default serialVersionUID */
+ private static final long serialVersionUID = 1L;
+
public Object writeReplace(int i) { return Integer.valueOf(i); }
}
diff --git a/src/test/testproxy/Target2.java b/src/test/testproxy/Target2.java
index 91b57be5..192bac77 100644
--- a/src/test/testproxy/Target2.java
+++ b/src/test/testproxy/Target2.java
@@ -2,6 +2,7 @@ package testproxy;
import java.io.IOException;
+@SuppressWarnings("unused")
public class Target2 {
private int value;
public Target2(int i) { value = 1; }
diff --git a/src/test/testproxy/sub/TargetSuper.java b/src/test/testproxy/sub/TargetSuper.java
index 0e40cded..9eb8d1da 100644
--- a/src/test/testproxy/sub/TargetSuper.java
+++ b/src/test/testproxy/sub/TargetSuper.java
@@ -1,5 +1,6 @@
package testproxy.sub;
+@SuppressWarnings("unused")
public class TargetSuper {
private int poi() { return 1; }
int poi2() { return 2; }