commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1088102 - /commons/proper/discovery/trunk/src/java/org/apache/commons/discovery/resource/names/DiscoverNamesInAlternateManagedProperties.java
Date Sat, 02 Apr 2011 20:07:18 GMT
Author: simonetripodi
Date: Sat Apr  2 20:07:17 2011
New Revision: 1088102

URL: http://svn.apache.org/viewvc?rev=1088102&view=rev
Log:
added generics to internal Map
internal Map made private final

Modified:
    commons/proper/discovery/trunk/src/java/org/apache/commons/discovery/resource/names/DiscoverNamesInAlternateManagedProperties.java

Modified: commons/proper/discovery/trunk/src/java/org/apache/commons/discovery/resource/names/DiscoverNamesInAlternateManagedProperties.java
URL: http://svn.apache.org/viewvc/commons/proper/discovery/trunk/src/java/org/apache/commons/discovery/resource/names/DiscoverNamesInAlternateManagedProperties.java?rev=1088102&r1=1088101&r2=1088102&view=diff
==============================================================================
--- commons/proper/discovery/trunk/src/java/org/apache/commons/discovery/resource/names/DiscoverNamesInAlternateManagedProperties.java
(original)
+++ commons/proper/discovery/trunk/src/java/org/apache/commons/discovery/resource/names/DiscoverNamesInAlternateManagedProperties.java
Sat Apr  2 20:07:17 2011
@@ -17,6 +17,7 @@
 package org.apache.commons.discovery.resource.names;
 
 import java.util.HashMap;
+import java.util.Map;
 
 import org.apache.commons.discovery.ResourceNameDiscover;
 import org.apache.commons.discovery.ResourceNameIterator;
@@ -46,7 +47,7 @@ public class DiscoverNamesInAlternateMan
         log = _log;
     }
 
-    HashMap mapping = new HashMap();
+    private final Map<String, String> mapping = new HashMap<String, String>();
     
     /** Construct a new resource discoverer
      */
@@ -63,7 +64,7 @@ public class DiscoverNamesInAlternateMan
      * @return Enumeration of ResourceInfo
      */
     public ResourceNameIterator findResourceNames(final String resourceName) {
-        final String mappedName = (String)mapping.get(resourceName);
+        final String mappedName = mapping.get(resourceName);
 
         if (log.isDebugEnabled()) {
             if (mappedName == null) {



Mime
View raw message