Author: peter_firmstone
Date: Wed Apr 17 14:55:13 2013
New Revision: 1468951

URL: http://svn.apache.org/r1468951
Log:
Removing instances of Thread.start() calls in object constructors and making 
fields final where possible.

Modified:
    
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/mahalo/TxnManagerImpl.java
    river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/mercury/MailboxImpl.java
    
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/reggie/RegistrarImpl.java

Modified: 
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/mahalo/TxnManagerImpl.java
URL: 
http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/mahalo/TxnManagerImpl.java?rev=1468951&r1=1468950&r2=1468951&view=diff
==============================================================================
--- 
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/mahalo/TxnManagerImpl.java 
(original)
+++ 
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/mahalo/TxnManagerImpl.java 
Wed Apr 17 14:55:13 2013
@@ -1635,6 +1635,9 @@ class TxnManagerImpl /*extends RemoteSer
             operationsLogger.exiting(
                TxnManagerImpl.class.getName(), "initFailed");
        }
+        if (e instanceof PrivilegedActionException){
+            e = e.getCause();
+        }
        if (e instanceof Exception) {
             throw (Exception) e;
         } else if (e instanceof Error) {

Modified: 
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/mercury/MailboxImpl.java
URL: 
http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/mercury/MailboxImpl.java?rev=1468951&r1=1468950&r2=1468951&view=diff
==============================================================================
--- 
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/mercury/MailboxImpl.java 
(original)
+++ 
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/mercury/MailboxImpl.java 
Wed Apr 17 14:55:13 2013
@@ -5063,6 +5063,7 @@ class MailboxImpl implements MailboxBack
      */
     protected void initFailed(Throwable e) throws Exception {
        initLogger.log(Level.SEVERE, "Mercury failed to initialize", e);
+        if (e instanceof PrivilegedActionException) e = e.getCause();
        if (e instanceof Exception) {
            throw (Exception) e;
        } else if (e instanceof Error) {

Modified: 
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/reggie/RegistrarImpl.java
URL: 
http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/reggie/RegistrarImpl.java?rev=1468951&r1=1468950&r2=1468951&view=diff
==============================================================================
--- 
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/reggie/RegistrarImpl.java 
(original)
+++ 
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/reggie/RegistrarImpl.java 
Wed Apr 17 14:55:13 2013
@@ -4909,13 +4909,13 @@ class RegistrarImpl implements Registrar
                     }, context);
         } catch (PrivilegedActionException ex) {
             throw ex.getException();
+        } finally {
+            // These object no longer needed, set free.
+            config = null;
+            unicastDiscoveryHost = null;
+            context = null;
+            ready.ready();
         }
-        
-        // These object no longer needed, set free.
-        config = null;
-        unicastDiscoveryHost = null;
-        context = null;
-        ready.ready();
     
     }
 


Reply via email to