This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-logging.git
The following commit(s) were added to refs/heads/master by this push:
new b3ebff6 Fix generics warnings in tests
b3ebff6 is described below
commit b3ebff64dce565add4ef56f3af761d61769a675f
Author: Gary Gregory <[email protected]>
AuthorDate: Wed Aug 14 08:44:27 2024 -0400
Fix generics warnings in tests
---
src/test/java/org/apache/commons/logging/LoadTestCase.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/test/java/org/apache/commons/logging/LoadTestCase.java
b/src/test/java/org/apache/commons/logging/LoadTestCase.java
index b882f39..339bfd2 100644
--- a/src/test/java/org/apache/commons/logging/LoadTestCase.java
+++ b/src/test/java/org/apache/commons/logging/LoadTestCase.java
@@ -17,6 +17,8 @@
package org.apache.commons.logging;
import java.lang.reflect.InvocationTargetException;
+import java.util.HashMap;
+import java.util.Map;
import junit.framework.TestCase;
@@ -36,7 +38,7 @@ public class LoadTestCase extends TestCase {
*/
static class AppClassLoader extends ClassLoader {
- java.util.Map classes = new java.util.HashMap();
+ Map<String, Class<?>> classes = new HashMap<>();
AppClassLoader(final ClassLoader parent) {
super(parent);
@@ -44,7 +46,7 @@ public class LoadTestCase extends TestCase {
private Class<?> def(final String name) throws ClassNotFoundException {
- Class<?> result = (Class<?>) classes.get(name);
+ Class<?> result = classes.get(name);
if (result != null) {
return result;
}