mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[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:
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user