Add and document @SuppressWarnings

This commit is contained in:
Gary Gregory 2022-05-30 08:59:02 -04:00
parent 254e0f1da8
commit 1fed20b531
1 changed files with 10 additions and 0 deletions

View File

@ -274,8 +274,13 @@ public class EnumUtilsTest {
assertNull(EnumUtils.getEnum(Traffic.class, "PURPLE", null));
}
/**
* Tests raw type.
*/
@SuppressWarnings("unchecked")
@Test
public void test_getEnum_nonEnumClass() {
@SuppressWarnings("rawtypes")
final Class rawType = Object.class;
assertNull(EnumUtils.getEnum(rawType, "rawType"));
}
@ -308,8 +313,13 @@ public class EnumUtilsTest {
assertNull(EnumUtils.getEnumIgnoreCase(Traffic.class, "PURPLE", null));
}
/**
* Tests raw type.
*/
@SuppressWarnings("unchecked")
@Test
public void test_getEnumIgnoreCase_nonEnumClass() {
@SuppressWarnings("rawtypes")
final Class rawType = Object.class;
assertNull(EnumUtils.getEnumIgnoreCase(rawType, "rawType"));
}