[wpiutil] Suppress unchecked cast in CombinedRuntimeLoader (#3155)

Because of Java's type system, it is actually literally impossible to check for this cast at runtime. So instead, the only option is to suppress it. Only suppressed for the specific function.
This commit is contained in:
Thad House
2021-02-07 08:20:33 -08:00
committed by GitHub
parent 3d44d8f79c
commit 43d40c6e9e

View File

@@ -56,7 +56,11 @@ public final class CombinedRuntimeLoader {
* @return List of all libraries that were extracted
* @throws IOException Thrown if resource not found or file could not be extracted
*/
@SuppressWarnings({"PMD.AvoidInstantiatingObjectsInLoops", "PMD.UnnecessaryCastRule"})
@SuppressWarnings({
"PMD.AvoidInstantiatingObjectsInLoops",
"PMD.UnnecessaryCastRule",
"unchecked"
})
public static <T> List<String> extractLibraries(Class<T> clazz, String resourceName)
throws IOException {
TypeReference<HashMap<String, Object>> typeRef =