commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1165020 - /commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/ChainListener.java
Date Sun, 04 Sep 2011 14:06:09 GMT
Author: simonetripodi
Date: Sun Sep  4 14:06:09 2011
New Revision: 1165020

URL: http://svn.apache.org/viewvc?rev=1165020&view=rev
Log:
fixed generics on ServletContext paths

Modified:
    commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/ChainListener.java

Modified: commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/ChainListener.java
URL: http://svn.apache.org/viewvc/commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/ChainListener.java?rev=1165020&r1=1165019&r2=1165020&view=diff
==============================================================================
--- commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/ChainListener.java
(original)
+++ commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/ChainListener.java
Sun Sep  4 14:06:09 2011
@@ -242,15 +242,16 @@ public class ChainListener implements Se
     private void parseJarResources(ServletContext context,
                                    ConfigParser parser, Log log) {
 
-        Set jars = context.getResourcePaths("/WEB-INF/lib");
+        @SuppressWarnings( "unchecked" ) // it is known that always returns String inside
+        Set<String> jars = context.getResourcePaths("/WEB-INF/lib");
         if (jars == null) {
-            jars = new HashSet();
+            jars = new HashSet<String>();
         }
         String path = null;
-        Iterator paths = jars.iterator();
+        Iterator<String> paths = jars.iterator();
         while (paths.hasNext()) {
 
-            path = (String) paths.next();
+            path = paths.next();
             if (!path.endsWith(".jar")) {
                 continue;
             }
@@ -306,12 +307,13 @@ public class ChainListener implements Se
     private void parseJarResources(Catalog catalog, ServletContext context,
                                    ConfigParser parser, Log log) {
 
-        Set jars = context.getResourcePaths("/WEB-INF/lib");
+        @SuppressWarnings( "unchecked" ) // it is known that always returns String inside
+        Set<String> jars = context.getResourcePaths("/WEB-INF/lib");
         if (jars == null) {
-            jars = new HashSet();
+            jars = new HashSet<String>();
         }
         String path = null;
-        Iterator paths = jars.iterator();
+        Iterator<String> paths = jars.iterator();
         while (paths.hasNext()) {
 
             path = (String) paths.next();



Mime
View raw message