Author: dbrosius
Date: Wed Aug 30 14:52:09 2006
New Revision: 438658

URL: http://svn.apache.org/viewvc?rev=438658&view=rev
Log:
remove needless synchronization of collection fields as these private fields 
are only modified in the constructor which is guaranteed thread safe.

Modified:
    
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/ControlFlowGraph.java
    
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/ExceptionHandlers.java
    
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/Subroutines.java

Modified: 
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/ControlFlowGraph.java
URL: 
http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/ControlFlowGraph.java?rev=438658&r1=438657&r2=438658&view=diff
==============================================================================
--- 
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/ControlFlowGraph.java
 (original)
+++ 
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/ControlFlowGraph.java
 Wed Aug 30 14:52:09 2006
@@ -18,8 +18,9 @@
 
 
 import java.util.ArrayList;
-import java.util.Hashtable;
+import java.util.HashMap;
 import java.util.Map;
+
 import org.apache.bcel.generic.ATHROW;
 import org.apache.bcel.generic.BranchInstruction;
 import org.apache.bcel.generic.GotoInstruction;
@@ -400,7 +401,7 @@
        private final ExceptionHandlers exceptionhandlers;
 
        /** All InstructionContext instances of this ControlFlowGraph. */
-       private Hashtable instructionContexts = new Hashtable(); //keys: 
InstructionHandle, values: InstructionContextImpl
+       private Map instructionContexts = new HashMap(); //keys: 
InstructionHandle, values: InstructionContextImpl
 
        /** 
         * A Control Flow Graph.

Modified: 
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/ExceptionHandlers.java
URL: 
http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/ExceptionHandlers.java?rev=438658&r1=438657&r2=438658&view=diff
==============================================================================
--- 
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/ExceptionHandlers.java
 (original)
+++ 
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/ExceptionHandlers.java
 Wed Aug 30 14:52:09 2006
@@ -17,9 +17,11 @@
 package org.apache.bcel.verifier.structurals;
 
 
+import java.util.HashMap;
 import java.util.HashSet;
-import java.util.Hashtable;
+import java.util.Map;
 import java.util.Set;
+
 import org.apache.bcel.generic.CodeExceptionGen;
 import org.apache.bcel.generic.InstructionHandle;
 import org.apache.bcel.generic.MethodGen;
@@ -35,13 +37,13 @@
         * The ExceptionHandler instances.
         * Key: InstructionHandle objects, Values: HashSet<ExceptionHandler> 
instances.
         */
-       private Hashtable exceptionhandlers;
+       private Map exceptionhandlers;
         
        /**
         * Constructor. Creates a new ExceptionHandlers instance.
         */
        public ExceptionHandlers(MethodGen mg){
-               exceptionhandlers = new Hashtable();
+               exceptionhandlers = new HashMap();
                CodeExceptionGen[] cegs = mg.getExceptionHandlers();
                for (int i=0; i<cegs.length; i++){
                        ExceptionHandler eh = new 
ExceptionHandler(cegs[i].getCatchType(), cegs[i].getHandlerPC());

Modified: 
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/Subroutines.java
URL: 
http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/Subroutines.java?rev=438658&r1=438657&r2=438658&view=diff
==============================================================================
--- 
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/Subroutines.java
 (original)
+++ 
jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/Subroutines.java
 Wed Aug 30 14:52:09 2006
@@ -19,7 +19,6 @@
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.HashSet;
-import java.util.Hashtable;
 import java.util.Iterator;
 import java.util.Map;
 import java.util.Set;
@@ -349,11 +348,11 @@
        private static final Integer BLACK = new Integer(2);
        
        /**
-        * The Hashtable containing the subroutines found.
+        * The map containing the subroutines found.
         * Key: InstructionHandle of the leader of the subroutine.
         * Elements: SubroutineImpl objects.
         */
-       private Hashtable subroutines = new Hashtable();
+       private Map subroutines = new HashMap();
 
        /**
         * This is referring to a special subroutine, namely the



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to