aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/javassist
diff options
context:
space:
mode:
authornickl- <github@jigsoft.co.za>2017-10-30 20:43:30 +0200
committernickl- <github@jigsoft.co.za>2017-10-30 20:43:30 +0200
commit0165b2e18b4c044b135724a69ee84a9d104c79ed (patch)
tree004a9eb0dc74ea014096640d4e9305cc4aea882a /src/test/javassist
parent62851d0af30cdb0c54046627585451a468aacd2a (diff)
downloadjavassist-0165b2e18b4c044b135724a69ee84a9d104c79ed.tar.gz
javassist-0165b2e18b4c044b135724a69ee84a9d104c79ed.zip
Squash compiler warnings in tests.
With the unit tests warnings were squashed by suppressing them with SuppressWarnings annotations, instead of reparing the issues as was done with the source. Reasons being... * The tests might be relying on the types as they were defined. * If the tests were written to test against the correct forms they would've/should've stipulated those. * Even unused members might be important to tests so we attempt to change as little as possible.
Diffstat (limited to 'src/test/javassist')
-rw-r--r--src/test/javassist/ClassPoolBench.java1
-rw-r--r--src/test/javassist/JvstTest.java1
-rw-r--r--src/test/javassist/JvstTest2.java1
-rw-r--r--src/test/javassist/JvstTest3.java1
-rw-r--r--src/test/javassist/JvstTest4.java1
-rw-r--r--src/test/javassist/JvstTest5.java1
-rw-r--r--src/test/javassist/LoaderTestByRandall.java1
-rw-r--r--src/test/javassist/SetterTest.java1
-rw-r--r--src/test/javassist/bytecode/BytecodeTest.java1
-rw-r--r--src/test/javassist/bytecode/CodeAnalyzerTest.java1
-rw-r--r--src/test/javassist/bytecode/InsertGap0.java3
-rw-r--r--src/test/javassist/bytecode/StackMapTest.java1
-rw-r--r--src/test/javassist/compiler/CompTest.java1
-rw-r--r--src/test/javassist/proxyfactory/ProxyFactoryTest.java1
-rw-r--r--src/test/javassist/proxyfactory/Tester.java1
15 files changed, 17 insertions, 0 deletions
diff --git a/src/test/javassist/ClassPoolBench.java b/src/test/javassist/ClassPoolBench.java
index d3cb6b2d..bf71051c 100644
--- a/src/test/javassist/ClassPoolBench.java
+++ b/src/test/javassist/ClassPoolBench.java
@@ -24,6 +24,7 @@ public class ClassPoolBench {
cc.detach();
}
+ @SuppressWarnings("rawtypes")
public static void accessAll(String filename) throws Exception {
ZipFile zip = new ZipFile(filename);
Enumeration files = zip.entries();
diff --git a/src/test/javassist/JvstTest.java b/src/test/javassist/JvstTest.java
index d660a335..c6825fd0 100644
--- a/src/test/javassist/JvstTest.java
+++ b/src/test/javassist/JvstTest.java
@@ -7,6 +7,7 @@ import javassist.bytecode.*;
import javassist.expr.*;
import javassist.runtime.*;
+@SuppressWarnings({"rawtypes","unused", "resource"})
public class JvstTest extends JvstTestRoot {
public static boolean java9;
diff --git a/src/test/javassist/JvstTest2.java b/src/test/javassist/JvstTest2.java
index 12bce5e4..117560c0 100644
--- a/src/test/javassist/JvstTest2.java
+++ b/src/test/javassist/JvstTest2.java
@@ -10,6 +10,7 @@ import java.lang.reflect.Method;
import javassist.expr.*;
+@SuppressWarnings({"rawtypes","unused"})
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class JvstTest2 extends JvstTestRoot {
public JvstTest2(String name) {
diff --git a/src/test/javassist/JvstTest3.java b/src/test/javassist/JvstTest3.java
index 056df5c2..47131a93 100644
--- a/src/test/javassist/JvstTest3.java
+++ b/src/test/javassist/JvstTest3.java
@@ -5,6 +5,7 @@ import javassist.bytecode.annotation.*;
import javassist.expr.*;
import test3.*;
+@SuppressWarnings({"rawtypes","unchecked","unused"})
public class JvstTest3 extends JvstTestRoot {
public JvstTest3(String name) {
super(name);
diff --git a/src/test/javassist/JvstTest4.java b/src/test/javassist/JvstTest4.java
index e1ead7dd..187abb3d 100644
--- a/src/test/javassist/JvstTest4.java
+++ b/src/test/javassist/JvstTest4.java
@@ -13,6 +13,7 @@ import javassist.bytecode.*;
import javassist.bytecode.annotation.Annotation;
import javassist.expr.*;
+@SuppressWarnings({"rawtypes","unchecked","unused"})
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class JvstTest4 extends JvstTestRoot {
public JvstTest4(String name) {
diff --git a/src/test/javassist/JvstTest5.java b/src/test/javassist/JvstTest5.java
index 76d0c1a2..578abfb2 100644
--- a/src/test/javassist/JvstTest5.java
+++ b/src/test/javassist/JvstTest5.java
@@ -12,6 +12,7 @@ import javassist.bytecode.InnerClassesAttribute;
import javassist.expr.ExprEditor;
import javassist.expr.MethodCall;
+@SuppressWarnings({"rawtypes","unchecked","unused"})
public class JvstTest5 extends JvstTestRoot {
public JvstTest5(String name) {
super(name);
diff --git a/src/test/javassist/LoaderTestByRandall.java b/src/test/javassist/LoaderTestByRandall.java
index 1b8825f6..04e05cd8 100644
--- a/src/test/javassist/LoaderTestByRandall.java
+++ b/src/test/javassist/LoaderTestByRandall.java
@@ -11,6 +11,7 @@ import junit.framework.TestCase;
/**
* @author brandall
*/
+@SuppressWarnings({"rawtypes","unused"})
public class LoaderTestByRandall extends TestCase {
ClassPool cp;
diff --git a/src/test/javassist/SetterTest.java b/src/test/javassist/SetterTest.java
index a989d39a..44eec140 100644
--- a/src/test/javassist/SetterTest.java
+++ b/src/test/javassist/SetterTest.java
@@ -3,6 +3,7 @@ import java.lang.reflect.Method;
import junit.framework.TestCase;
+@SuppressWarnings({"rawtypes","unchecked"})
public class SetterTest extends TestCase {
ClassPool pool;
diff --git a/src/test/javassist/bytecode/BytecodeTest.java b/src/test/javassist/bytecode/BytecodeTest.java
index a9b6e538..5ddf5d5b 100644
--- a/src/test/javassist/bytecode/BytecodeTest.java
+++ b/src/test/javassist/bytecode/BytecodeTest.java
@@ -7,6 +7,7 @@ import javassist.*;
import javassist.bytecode.annotation.*;
import javassist.bytecode.SignatureAttribute.*;
+@SuppressWarnings("unused")
public class BytecodeTest extends TestCase {
public static final String PATH = JvstTest.PATH;
private ClassPool loader, dloader;
diff --git a/src/test/javassist/bytecode/CodeAnalyzerTest.java b/src/test/javassist/bytecode/CodeAnalyzerTest.java
index 4f115687..b6b33189 100644
--- a/src/test/javassist/bytecode/CodeAnalyzerTest.java
+++ b/src/test/javassist/bytecode/CodeAnalyzerTest.java
@@ -5,6 +5,7 @@ import java.util.Enumeration;
import java.util.List;
import java.io.*;
+@SuppressWarnings({"rawtypes","resource"})
public class CodeAnalyzerTest {
public static void main(String[] args) throws Exception {
ZipFile zfile = new ZipFile(args[0]);
diff --git a/src/test/javassist/bytecode/InsertGap0.java b/src/test/javassist/bytecode/InsertGap0.java
index 6a034141..824b9305 100644
--- a/src/test/javassist/bytecode/InsertGap0.java
+++ b/src/test/javassist/bytecode/InsertGap0.java
@@ -2,6 +2,7 @@ package javassist.bytecode;
import javassist.*;
+@SuppressWarnings("unused")
final class Gap0Example {
public static int counter = 1;
@@ -70,6 +71,7 @@ final class Gap0Example {
}
}
+@SuppressWarnings("unused")
final class Gap0Example2 {
public static int counter = 1;
@@ -155,6 +157,7 @@ final class Gap0Example2 {
}
}
+@SuppressWarnings({"rawtypes","unchecked","unused"})
public final class InsertGap0 extends JvstTestRoot {
public InsertGap0(String name) {
super(name);
diff --git a/src/test/javassist/bytecode/StackMapTest.java b/src/test/javassist/bytecode/StackMapTest.java
index 77d827be..153f75ac 100644
--- a/src/test/javassist/bytecode/StackMapTest.java
+++ b/src/test/javassist/bytecode/StackMapTest.java
@@ -21,6 +21,7 @@ import javassist.bytecode.stackmap.MapMaker;
import javassist.bytecode.stackmap.TypeData;
import junit.framework.TestCase;
+@SuppressWarnings({"rawtypes","unused"})
public class StackMapTest extends TestCase {
public static final String PATH = JvstTest.PATH;
private ClassPool loader, dloader;
diff --git a/src/test/javassist/compiler/CompTest.java b/src/test/javassist/compiler/CompTest.java
index 158552e3..4154935f 100644
--- a/src/test/javassist/compiler/CompTest.java
+++ b/src/test/javassist/compiler/CompTest.java
@@ -125,6 +125,7 @@ class Print{
public static int k;
}
+@SuppressWarnings({"rawtypes","unchecked"})
class HelloAspect{
List list;
diff --git a/src/test/javassist/proxyfactory/ProxyFactoryTest.java b/src/test/javassist/proxyfactory/ProxyFactoryTest.java
index dd52619d..3189b568 100644
--- a/src/test/javassist/proxyfactory/ProxyFactoryTest.java
+++ b/src/test/javassist/proxyfactory/ProxyFactoryTest.java
@@ -11,6 +11,7 @@ import java.lang.reflect.Method;
/**
* <a href="mailto:struberg@yahoo.de">Mark Struberg</a>
*/
+@SuppressWarnings({"rawtypes","unchecked","unused"})
public class ProxyFactoryTest extends TestCase {
public void testMethodHandlers() throws Exception {
ProxyFactory fact = new ProxyFactory();
diff --git a/src/test/javassist/proxyfactory/Tester.java b/src/test/javassist/proxyfactory/Tester.java
index 7d484ecb..874fba1e 100644
--- a/src/test/javassist/proxyfactory/Tester.java
+++ b/src/test/javassist/proxyfactory/Tester.java
@@ -14,6 +14,7 @@ class Hand implements java.io.Serializable {
int getHandler() { return 3; }
}
+@SuppressWarnings({"rawtypes","unchecked","resource"})
public class Tester extends TestCase {
static class MHandler implements MethodHandler, java.io.Serializable {
/** default serialVersionUID */