[jboss-svn-commits] JBL Code SVN: r35908 - in labs/jbosstm/trunk: ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/recovery and 1 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon Nov 8 09:32:05 EST 2010


Author: jhalliday
Date: 2010-11-08 09:31:59 -0500 (Mon, 08 Nov 2010)
New Revision: 35908

Modified:
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/recovery/RecoveryManager.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/recovery/PeriodicRecovery.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/recovery/RecoveryManagerImple.java
   labs/jbosstm/trunk/txbridge/src/org/jboss/jbossts/txbridge/inbound/InboundBridgeRecoveryManager.java
Log:
Add generics to RecoveryModule handling to get rid of annoying compiler warning in tx bridge. JBTM-44


Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/recovery/RecoveryManager.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/recovery/RecoveryManager.java	2010-11-08 13:45:44 UTC (rev 35907)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/recovery/RecoveryManager.java	2010-11-08 14:31:59 UTC (rev 35908)
@@ -328,7 +328,7 @@
      * @throws IllegalStateException if the recovery manager has been shutdown.
      */
 
-    public final Vector getModules ()
+    public final Vector<RecoveryModule> getModules ()
     {
         checkState();
 

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/recovery/PeriodicRecovery.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/recovery/PeriodicRecovery.java	2010-11-08 13:45:44 UTC (rev 35907)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/recovery/PeriodicRecovery.java	2010-11-08 14:31:59 UTC (rev 35908)
@@ -585,13 +585,13 @@
      * @return a copy of the the recovery modules list.
      */
 
-    public final Vector getModules ()
+    public final Vector<RecoveryModule> getModules ()
     {
         // return a copy of the modules list so that clients are not affected by dynamic modifications to the list
         // synchronize so that we don't copy in the middle of an add or remove
 
         synchronized (_recoveryModules) {
-            return new Vector(_recoveryModules);
+            return new Vector<RecoveryModule>(_recoveryModules);
         }
     }
     /*
@@ -916,7 +916,6 @@
      */
    private void initialise ()
     {
-        _recoveryModules = new Vector();
         setStatus(Status.INACTIVE);
         setMode(Mode.ENABLED);
 
@@ -941,7 +940,7 @@
     * list of instances of RecoiveryModule either loaded during startup as specified in the recovery manager
     * property file or added dynamically by calls to addModule
     */
-   private Vector _recoveryModules = null;
+   private final Vector<RecoveryModule> _recoveryModules = new Vector<RecoveryModule>();
 
    /**
     * time in seconds between the first and second pass in any given scan

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/recovery/RecoveryManagerImple.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/recovery/RecoveryManagerImple.java	2010-11-08 13:45:44 UTC (rev 35907)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/recovery/RecoveryManagerImple.java	2010-11-08 14:31:59 UTC (rev 35908)
@@ -150,7 +150,7 @@
         _periodicRecovery.removeAllModules(waitOnScan);
     }
 
-    public final Vector getModules ()
+    public final Vector<RecoveryModule> getModules ()
     {
         return _periodicRecovery.getModules();
     }

Modified: labs/jbosstm/trunk/txbridge/src/org/jboss/jbossts/txbridge/inbound/InboundBridgeRecoveryManager.java
===================================================================
--- labs/jbosstm/trunk/txbridge/src/org/jboss/jbossts/txbridge/inbound/InboundBridgeRecoveryManager.java	2010-11-08 13:45:44 UTC (rev 35907)
+++ labs/jbosstm/trunk/txbridge/src/org/jboss/jbossts/txbridge/inbound/InboundBridgeRecoveryManager.java	2010-11-08 14:31:59 UTC (rev 35908)
@@ -96,7 +96,7 @@
         // expose orphan filters directly, as with e.g. [add|remove]XAResourceRecovery.
 
         XARecoveryModule xaRecoveryModule = null;
-        for(RecoveryModule recoveryModule : ((Vector<RecoveryModule>)acRecoveryManager.getModules())) {
+        for(RecoveryModule recoveryModule : acRecoveryManager.getModules()) {
             if(recoveryModule instanceof XARecoveryModule) {
                 xaRecoveryModule = (XARecoveryModule)recoveryModule;
                 break;



More information about the jboss-svn-commits mailing list