aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/testproxy
diff options
context:
space:
mode:
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; }