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

commit d6ae2efb643f6bc8ea14d7f551d44cb89fd7b55d
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Sun Jun 30 08:34:23 2024 -0400

    Use generics
---
 .../apache/commons/logging/pathable/ChildFirstTestCase.java    | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git 
a/src/test/java/org/apache/commons/logging/pathable/ChildFirstTestCase.java 
b/src/test/java/org/apache/commons/logging/pathable/ChildFirstTestCase.java
index e30206a..2790d5d 100644
--- a/src/test/java/org/apache/commons/logging/pathable/ChildFirstTestCase.java
+++ b/src/test/java/org/apache/commons/logging/pathable/ChildFirstTestCase.java
@@ -95,13 +95,13 @@ public class ChildFirstTestCase extends TestCase {
     /**
      * Utility method to convert an enumeration-of-URLs into an array of URLs.
      */
-    private static URL[] toURLArray(final Enumeration e) {
-        final ArrayList l = new ArrayList();
+    private static URL[] toURLArray(final Enumeration<URL> e) {
+        final ArrayList<URL> l = new ArrayList<>();
         while (e.hasMoreElements()) {
-            l.add((URL) e.nextElement());
+            l.add(e.nextElement());
         }
         final URL[] tmp = new URL[l.size()];
-        return (URL[]) l.toArray(tmp);
+        return l.toArray(tmp);
     }
 
     /**
@@ -266,7 +266,7 @@ public class ChildFirstTestCase extends TestCase {
      * Test that the various flavors of ClassLoader.getResources work as 
expected.
      */
     public void testResources() throws Exception {
-        Enumeration resources;
+        Enumeration<URL> resources;
         URL[] urls;
 
         // verify the class loader hierarchy

Reply via email to