[hornetq-commits] JBoss hornetq SVN: r11471 - in trunk/hornetq-core/src/main/java/org/hornetq: core/settings/impl and 1 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Wed Oct 5 12:42:20 EDT 2011


Author: borges
Date: 2011-10-05 12:42:19 -0400 (Wed, 05 Oct 2011)
New Revision: 11471

Modified:
   trunk/hornetq-core/src/main/java/org/hornetq/core/deployers/impl/FileDeploymentManager.java
   trunk/hornetq-core/src/main/java/org/hornetq/core/settings/impl/HierarchicalObjectRepository.java
   trunk/hornetq-core/src/main/java/org/hornetq/utils/XMLUtil.java
Log:
Type fixes

Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/deployers/impl/FileDeploymentManager.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/deployers/impl/FileDeploymentManager.java	2011-10-05 16:41:58 UTC (rev 11470)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/deployers/impl/FileDeploymentManager.java	2011-10-05 16:42:19 UTC (rev 11471)
@@ -227,7 +227,7 @@
                }
             }
          }
-         List<Pair> toRemove = new ArrayList<Pair>();
+         List<Pair<URL, Deployer>> toRemove = new ArrayList<Pair<URL, Deployer>>();
          for (Map.Entry<Pair<URL, Deployer>, DeployInfo> entry : deployed.entrySet())
          {
             Pair<URL, Deployer> pair = entry.getKey();
@@ -246,7 +246,7 @@
                }
             }
          }
-         for (Pair pair : toRemove)
+         for (Pair<URL, Deployer> pair : toRemove)
          {
             deployed.remove(pair);
          }
@@ -271,7 +271,7 @@
 
    /**
     * Checks if the URL is among the current thread context class loader's resources.
-    * 
+    *
     * We do not check that the corresponding file exists using File.exists() directly as it would fail
     * in the case the resource is loaded from inside an EAR file (see https://jira.jboss.org/jira/browse/HORNETQ-122)
     */

Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/settings/impl/HierarchicalObjectRepository.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/settings/impl/HierarchicalObjectRepository.java	2011-10-05 16:41:58 UTC (rev 11470)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/settings/impl/HierarchicalObjectRepository.java	2011-10-05 16:42:19 UTC (rev 11471)
@@ -47,7 +47,7 @@
     * all the matches
     */
    private final Map<String, Match<T>> matches = new HashMap<String, Match<T>>();
-   
+
    /**
     * Certain values cannot be removed after installed.
     * This is because we read a few records from the main config.
@@ -72,13 +72,13 @@
     */
    private final ArrayList<HierarchicalRepositoryChangeListener> listeners = new ArrayList<HierarchicalRepositoryChangeListener>();
 
-   
+
    public void addMatch(final String match, final T value)
    {
       addMatch(match, value, false);
    }
-   
 
+
    /**
     * Add a new match to the repository
     *
@@ -98,7 +98,7 @@
       matches.put(match, match1);
       onChange();
    }
-   
+
    public int getCacheSize()
    {
       return cache.size();
@@ -149,7 +149,7 @@
          }
          else
          {
-            ((Mergeable)actualMatch).merge(match.getValue());
+            ((Mergeable<T>)actualMatch).merge(match.getValue());
 
          }
       }
@@ -220,7 +220,7 @@
       listeners.clear();
       matches.clear();
    }
-   
+
    public void clearCache()
    {
       cache.clear();

Modified: trunk/hornetq-core/src/main/java/org/hornetq/utils/XMLUtil.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/utils/XMLUtil.java	2011-10-05 16:41:58 UTC (rev 11470)
+++ trunk/hornetq-core/src/main/java/org/hornetq/utils/XMLUtil.java	2011-10-05 16:42:19 UTC (rev 11471)
@@ -331,8 +331,8 @@
          NodeList nl2 = node2.getChildNodes();
 
          short[] toFilter = new short[] { Node.TEXT_NODE, Node.ATTRIBUTE_NODE, Node.COMMENT_NODE };
-         List nodes = XMLUtil.filter(nl, toFilter);
-         List nodes2 = XMLUtil.filter(nl2, toFilter);
+         List<Node> nodes = XMLUtil.filter(nl, toFilter);
+         List<Node> nodes2 = XMLUtil.filter(nl2, toFilter);
 
          int length = nodes.size();
 
@@ -343,8 +343,8 @@
 
          for (int i = 0; i < length; i++)
          {
-            Node n = (Node)nodes.get(i);
-            Node n2 = (Node)nodes2.get(i);
+            Node n = nodes.get(i);
+            Node n2 = nodes2.get(i);
             XMLUtil.assertEquivalent(n, n2);
          }
       }
@@ -509,9 +509,9 @@
 
    // Private --------------------------------------------------------------------------------------
 
-   private static List filter(final NodeList nl, final short[] typesToFilter)
+   private static List<Node> filter(final NodeList nl, final short[] typesToFilter)
    {
-      List nodes = new ArrayList();
+      List<Node> nodes = new ArrayList<Node>();
 
       outer: for (int i = 0; i < nl.getLength(); i++)
       {



More information about the hornetq-commits mailing list