@@ -57,7 +57,7 @@ public void testConstants() {
57
57
public void testGetNames () {
58
58
Constants c = new Constants (A .class );
59
59
60
- Set names = c .getNames ("" );
60
+ Set <?> names = c .getNames ("" );
61
61
assertEquals (c .getSize (), names .size ());
62
62
assertTrue (names .contains ("DOG" ));
63
63
assertTrue (names .contains ("CAT" ));
@@ -75,7 +75,7 @@ public void testGetNames() {
75
75
public void testGetValues () {
76
76
Constants c = new Constants (A .class );
77
77
78
- Set values = c .getValues ("" );
78
+ Set <?> values = c .getValues ("" );
79
79
assertEquals (7 , values .size ());
80
80
assertTrue (values .contains (new Integer (0 )));
81
81
assertTrue (values .contains (new Integer (66 )));
@@ -102,7 +102,7 @@ public void testGetValuesInTurkey() {
102
102
try {
103
103
Constants c = new Constants (A .class );
104
104
105
- Set values = c .getValues ("" );
105
+ Set <?> values = c .getValues ("" );
106
106
assertEquals (7 , values .size ());
107
107
assertTrue (values .contains (new Integer (0 )));
108
108
assertTrue (values .contains (new Integer (66 )));
@@ -130,12 +130,12 @@ public void testGetValuesInTurkey() {
130
130
public void testSuffixAccess () {
131
131
Constants c = new Constants (A .class );
132
132
133
- Set names = c .getNamesForSuffix ("_PROPERTY" );
133
+ Set <?> names = c .getNamesForSuffix ("_PROPERTY" );
134
134
assertEquals (2 , names .size ());
135
135
assertTrue (names .contains ("NO_PROPERTY" ));
136
136
assertTrue (names .contains ("YES_PROPERTY" ));
137
137
138
- Set values = c .getValuesForSuffix ("_PROPERTY" );
138
+ Set <?> values = c .getValuesForSuffix ("_PROPERTY" );
139
139
assertEquals (2 , values .size ());
140
140
assertTrue (values .contains (new Integer (3 )));
141
141
assertTrue (values .contains (new Integer (4 )));
@@ -210,26 +210,26 @@ public void testToCode() {
210
210
211
211
public void testGetValuesWithNullPrefix () throws Exception {
212
212
Constants c = new Constants (A .class );
213
- Set values = c .getValues (null );
213
+ Set <?> values = c .getValues (null );
214
214
assertEquals ("Must have returned *all* public static final values" , 7 , values .size ());
215
215
}
216
216
217
217
public void testGetValuesWithEmptyStringPrefix () throws Exception {
218
218
Constants c = new Constants (A .class );
219
- Set values = c .getValues ("" );
219
+ Set < Object > values = c .getValues ("" );
220
220
assertEquals ("Must have returned *all* public static final values" , 7 , values .size ());
221
221
}
222
222
223
223
public void testGetValuesWithWhitespacedStringPrefix () throws Exception {
224
224
Constants c = new Constants (A .class );
225
- Set values = c .getValues (" " );
225
+ Set <?> values = c .getValues (" " );
226
226
assertEquals ("Must have returned *all* public static final values" , 7 , values .size ());
227
227
}
228
228
229
229
public void testWithClassThatExposesNoConstants () throws Exception {
230
230
Constants c = new Constants (NoConstants .class );
231
231
assertEquals (0 , c .getSize ());
232
- final Set values = c .getValues ("" );
232
+ final Set <?> values = c .getValues ("" );
233
233
assertNotNull (values );
234
234
assertEquals (0 , values .size ());
235
235
}
@@ -245,10 +245,11 @@ public void testCtorWithNullClass() throws Exception {
245
245
246
246
private static final class NoConstants {
247
247
}
248
-
249
248
249
+
250
+ @ SuppressWarnings ("unused" )
250
251
private static final class A {
251
-
252
+
252
253
public static final int DOG = 0 ;
253
254
public static final int CAT = 66 ;
254
255
public static final String S1 = "" ;
0 commit comments