Skip to content

Commit dca5708

Browse files
committed
warnings cleanup
1 parent 6da1303 commit dca5708

File tree

7 files changed

+23
-29
lines changed

7 files changed

+23
-29
lines changed

Diff for: src/main/java/com/fasterxml/classmate/TypeResolver.java

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import com.fasterxml.classmate.types.*;
88
import com.fasterxml.classmate.util.ClassKey;
99
import com.fasterxml.classmate.util.ClassStack;
10-
import com.fasterxml.classmate.util.LRUTypeCache;
1110
import com.fasterxml.classmate.util.ResolvedTypeCache;
1211
import com.fasterxml.classmate.util.ResolvedTypeKey;
1312

Diff for: src/test/java/com/fasterxml/classmate/ResolvedTypeTest.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ public class ResolvedTypeTest extends BaseTest
1414
{
1515
// For [Issue#16]
1616

17-
private static class Foo16 extends Bar16 { }
17+
static class Foo16 extends Bar16 { }
1818

19-
private static class Bar16 extends Zen16<Bar16, Foo16> { }
19+
static class Bar16 extends Zen16<Bar16, Foo16> { }
2020

21-
private static class Zen16<A, B extends A> { }
21+
static class Zen16<A, B extends A> { }
2222

2323
@Test
2424
public void testCanCreateSubtype() {

Diff for: src/test/java/com/fasterxml/classmate/ResolvedTypeWithMembersTest.java

+10-10
Original file line numberDiff line numberDiff line change
@@ -20,32 +20,32 @@
2020
public class ResolvedTypeWithMembersTest {
2121

2222
@Retention(RetentionPolicy.RUNTIME)
23-
private static @interface Marker { }
23+
static @interface Marker { }
2424

2525
@Retention(RetentionPolicy.RUNTIME)
26-
private static @interface MarkerB { }
26+
static @interface MarkerB { }
2727

2828
@Retention(RetentionPolicy.RUNTIME)
2929
@Inherited
30-
private static @interface MarkerC { }
30+
static @interface MarkerC { }
3131

3232
@SuppressWarnings("unused")
33-
private static class MixinCandidate {
33+
static class MixinCandidate {
3434
private static void staticOverride() { }
3535
private String shadowed;
3636
private MixinCandidate() { }
3737
protected String getShadowed() { return shadowed; }
3838
}
3939

40-
private static class MixinA {
40+
static class MixinA {
4141
@Marker
4242
private static void staticOverride() { }
4343

4444
@Marker
4545
private String shadowed;
4646

4747
@Marker
48-
private MixinA() { }
48+
MixinA() { }
4949

5050
@Marker
5151
protected String getShadowed() { return shadowed; }
@@ -54,17 +54,17 @@ private MixinA() { }
5454
protected String inherited() { return ""; }
5555
}
5656

57-
private static class MixinB {
57+
static class MixinB {
5858
@MarkerB
5959
protected String getShadowed() { return null; }
6060
}
6161

62-
private static class MixinC {
62+
static class MixinC {
6363
@MarkerB
6464
protected String getShadowed() { return null; }
6565
}
6666

67-
private static class MixinD {
67+
static class MixinD {
6868

6969
@Marker
7070
private String field;
@@ -76,7 +76,7 @@ private MixinD() { }
7676
protected String getShadowed() { return null; }
7777
}
7878

79-
private static class MixinASubclass extends MixinA {
79+
static class MixinASubclass extends MixinA {
8080

8181
@Override protected String getShadowed() { return super.getShadowed(); }
8282

Diff for: src/test/java/com/fasterxml/classmate/members/ResolvedConstructorTest.java

+1-3
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@
66

77
import java.lang.reflect.Constructor;
88

9-
import static junit.framework.Assert.*;
9+
import static org.junit.Assert.*;
1010

1111
/**
1212
* @author blangel
1313
*/
14-
@SuppressWarnings("deprecation")
1514
public class ResolvedConstructorTest {
1615

1716
private static final Constructor<String> stringConstructor;
@@ -25,7 +24,6 @@ public class ResolvedConstructorTest {
2524
}
2625
}
2726

28-
@SuppressWarnings("unused")
2927
@Test
3028
public void init() {
3129
try {

Diff for: src/test/java/com/fasterxml/classmate/util/ClassKeyTest.java

+4-5
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,20 @@
22

33
import org.junit.Test;
44

5-
import static junit.framework.Assert.*;
5+
import static org.junit.Assert.*;
66

77
/**
88
* @author blangel
99
*/
10-
@SuppressWarnings({ "serial", "deprecation" })
10+
@SuppressWarnings({ "serial" })
1111
public class ClassKeyTest
1212
{
13-
private static class ClassKeySubclass extends ClassKey {
14-
private ClassKeySubclass(Class<?> clz) {
13+
static class ClassKeySubclass extends ClassKey {
14+
ClassKeySubclass(Class<?> clz) {
1515
super(clz);
1616
}
1717
}
1818

19-
@SuppressWarnings("unused")
2019
@Test
2120
public void nullClass() {
2221
try {

Diff for: src/test/java/com/fasterxml/classmate/util/MethodKeyTest.java

+3-4
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22

33
import org.junit.Test;
44

5-
import static junit.framework.Assert.*;
5+
import static org.junit.Assert.*;
66

7-
@SuppressWarnings("deprecation")
87
public class MethodKeyTest {
98

109
@SuppressWarnings("serial")
1110
private static class MethodKeySubclass extends MethodKey {
12-
private MethodKeySubclass(String name) {
11+
MethodKeySubclass(String name) {
1312
super(name);
1413
}
1514
}
@@ -25,7 +24,7 @@ public void equals() {
2524
assertFalse(key1.equals(null));
2625

2726
// test unequal class
28-
assertFalse(key1.equals("test"));
27+
assertFalse(key1.equals((Object) "test"));
2928

3029
// test subclass
3130
MethodKeySubclass methodKeySubclass = new MethodKeySubclass("test");

Diff for: src/test/java/com/fasterxml/classmate/util/TestResolvedTypeCache.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212

1313
public class TestResolvedTypeCache extends TestCase
1414
{
15-
private static class KeySubclass extends ResolvedTypeKey {
16-
private KeySubclass(Class<?> simpleType) {
15+
static class KeySubclass extends ResolvedTypeKey {
16+
KeySubclass(Class<?> simpleType) {
1717
super(simpleType);
1818
}
1919
}
@@ -68,7 +68,6 @@ private void _testSimple(ResolvedTypeCache cache, boolean lru) {
6868
}
6969
}
7070

71-
@SuppressWarnings("unused")
7271
public void testKeyEquals()
7372
{
7473
try {

0 commit comments

Comments
 (0)