aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/test2
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/test2
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/test2')
-rw-r--r--src/test/test2/AddMethod.java1
-rw-r--r--src/test/test2/Anon.java1
-rw-r--r--src/test/test2/Brennan.java1
-rw-r--r--src/test/test2/Inner.java1
-rw-r--r--src/test/test2/InsertLocal.java1
-rw-r--r--src/test/test2/Nested.java1
-rw-r--r--src/test/test2/Nested2.java1
-rw-r--r--src/test/test2/Nested3.java1
-rw-r--r--src/test/test2/Nested4.java1
-rw-r--r--src/test/test2/NewArray.java1
-rw-r--r--src/test/test2/NewExprInTry.java2
-rw-r--r--src/test/test2/NewExprTry.java1
-rw-r--r--src/test/test2/NewOp.java1
13 files changed, 14 insertions, 0 deletions
diff --git a/src/test/test2/AddMethod.java b/src/test/test2/AddMethod.java
index a7179e6e..c04ff606 100644
--- a/src/test/test2/AddMethod.java
+++ b/src/test/test2/AddMethod.java
@@ -1,6 +1,7 @@
package test2;
public class AddMethod {
+ @SuppressWarnings("unused")
private int f;
public int f() { return 0; }
diff --git a/src/test/test2/Anon.java b/src/test/test2/Anon.java
index 56223436..a9c0773f 100644
--- a/src/test/test2/Anon.java
+++ b/src/test/test2/Anon.java
@@ -1,5 +1,6 @@
package test2;
+@SuppressWarnings("unused")
public class Anon {
public Object make() {
return new Object() { int k; };
diff --git a/src/test/test2/Brennan.java b/src/test/test2/Brennan.java
index e93e00a9..4cc0a505 100644
--- a/src/test/test2/Brennan.java
+++ b/src/test/test2/Brennan.java
@@ -1,5 +1,6 @@
package test2;
+@SuppressWarnings("unused")
public class Brennan {
private Object format = null;
}
diff --git a/src/test/test2/Inner.java b/src/test/test2/Inner.java
index dbfb6d6e..15e08663 100644
--- a/src/test/test2/Inner.java
+++ b/src/test/test2/Inner.java
@@ -1,5 +1,6 @@
package test2;
+@SuppressWarnings("unused")
public class Inner {
public void sample() throws Exception {
java.util.Properties props = new java.util.Properties();
diff --git a/src/test/test2/InsertLocal.java b/src/test/test2/InsertLocal.java
index d400e622..43794cc8 100644
--- a/src/test/test2/InsertLocal.java
+++ b/src/test/test2/InsertLocal.java
@@ -22,6 +22,7 @@ public class InsertLocal {
return k + s.length();
}
+ @SuppressWarnings("unused")
public int run3() {
int i = 0;
int j = field;
diff --git a/src/test/test2/Nested.java b/src/test/test2/Nested.java
index 70ce60ee..6bb4547a 100644
--- a/src/test/test2/Nested.java
+++ b/src/test/test2/Nested.java
@@ -1,5 +1,6 @@
package test2;
+@SuppressWarnings("unused")
public class Nested {
private int i = 3;
private int geti() { return i; }
diff --git a/src/test/test2/Nested2.java b/src/test/test2/Nested2.java
index f23439bd..728c1b7a 100644
--- a/src/test/test2/Nested2.java
+++ b/src/test/test2/Nested2.java
@@ -1,5 +1,6 @@
package test2;
+@SuppressWarnings("unused")
public class Nested2 {
private int i = 3;
private double d = 3.0;
diff --git a/src/test/test2/Nested3.java b/src/test/test2/Nested3.java
index 570f7a5e..9e9f1ab3 100644
--- a/src/test/test2/Nested3.java
+++ b/src/test/test2/Nested3.java
@@ -1,5 +1,6 @@
package test2;
+@SuppressWarnings("unused")
public class Nested3 {
private int i = 0;
private int geti() { return i; }
diff --git a/src/test/test2/Nested4.java b/src/test/test2/Nested4.java
index 5b33aea5..04bcd767 100644
--- a/src/test/test2/Nested4.java
+++ b/src/test/test2/Nested4.java
@@ -1,5 +1,6 @@
package test2;
+@SuppressWarnings("unused")
public class Nested4 {
private static int value = 6;
}
diff --git a/src/test/test2/NewArray.java b/src/test/test2/NewArray.java
index d61fa750..f7c0439b 100644
--- a/src/test/test2/NewArray.java
+++ b/src/test/test2/NewArray.java
@@ -1,5 +1,6 @@
package test2;
+@SuppressWarnings("unused")
public class NewArray {
public int run() {
return foo(1);
diff --git a/src/test/test2/NewExprInTry.java b/src/test/test2/NewExprInTry.java
index 804a7c8d..70dc9b28 100644
--- a/src/test/test2/NewExprInTry.java
+++ b/src/test/test2/NewExprInTry.java
@@ -2,6 +2,7 @@ package test2;
import java.util.HashMap;
+@SuppressWarnings("rawtypes")
class HashMapWrapper extends HashMap {
/** default serialVersionUID */
private static final long serialVersionUID = 1L;
@@ -11,6 +12,7 @@ class HashMapWrapper extends HashMap {
}
}
+@SuppressWarnings({"rawtypes","unused"})
public class NewExprInTry {
public int run() {
return foo(6);
diff --git a/src/test/test2/NewExprTry.java b/src/test/test2/NewExprTry.java
index fb779d96..f728dbe7 100644
--- a/src/test/test2/NewExprTry.java
+++ b/src/test/test2/NewExprTry.java
@@ -15,6 +15,7 @@ public class NewExprTry {
}
public static void main(String[] args) {
+ @SuppressWarnings("unused")
NewExprTry obj = new NewExprTry(3);
}
}
diff --git a/src/test/test2/NewOp.java b/src/test/test2/NewOp.java
index bf798a92..a9334252 100644
--- a/src/test/test2/NewOp.java
+++ b/src/test/test2/NewOp.java
@@ -5,6 +5,7 @@ class NewOp2 {
}
public class NewOp {
+ @SuppressWarnings("rawtypes")
java.util.Vector listenerList;
static int i = 0;
static String s;