From: aclement Date: Tue, 22 May 2007 09:11:40 +0000 (+0000) Subject: fix for problem LTW in multi-threaded configuration - removed static from bcel classes X-Git-Tag: V1_5_4rc1~70 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f458b3f74ec877f321673bf076df3016debcf0b8;p=aspectj.git fix for problem LTW in multi-threaded configuration - removed static from bcel classes --- diff --git a/bcel-builder/src/org/aspectj/apache/bcel/generic/BranchHandle.java b/bcel-builder/src/org/aspectj/apache/bcel/generic/BranchHandle.java index eed275112..74788f5ea 100644 --- a/bcel-builder/src/org/aspectj/apache/bcel/generic/BranchHandle.java +++ b/bcel-builder/src/org/aspectj/apache/bcel/generic/BranchHandle.java @@ -63,7 +63,7 @@ package org.aspectj.apache.bcel.generic; * @see InstructionHandle * @see Instruction * @see InstructionList - * @version $Id: BranchHandle.java,v 1.2 2004/11/19 16:45:19 aclement Exp $ + * @version $Id: BranchHandle.java,v 1.3 2007/05/22 09:11:40 aclement Exp $ * @author M. Dahm */ public final class BranchHandle extends InstructionHandle { @@ -76,26 +76,9 @@ public final class BranchHandle extends InstructionHandle { /** Factory methods. */ - private static BranchHandle bh_list = null; // List of reusable handles static final BranchHandle getBranchHandle(BranchInstruction i) { - if(bh_list == null) return new BranchHandle(i); - else { - BranchHandle bh = bh_list; - bh_list = (BranchHandle)bh.next; - - bh.setInstruction(i); - - return bh; - } - } - - /** Handle adds itself to the list of resuable handles. - */ - protected void addHandle() { - next = bh_list; - bh_list = this; } /* Override InstructionHandle methods: delegate to branch instruction. diff --git a/bcel-builder/src/org/aspectj/apache/bcel/generic/InstructionHandle.java b/bcel-builder/src/org/aspectj/apache/bcel/generic/InstructionHandle.java index df4b4b547..b4a2b4c8e 100644 --- a/bcel-builder/src/org/aspectj/apache/bcel/generic/InstructionHandle.java +++ b/bcel-builder/src/org/aspectj/apache/bcel/generic/InstructionHandle.java @@ -71,7 +71,7 @@ import java.util.HashMap; * can traverse the list via an Enumeration returned by * InstructionList.elements(). * - * @version $Id: InstructionHandle.java,v 1.2 2004/11/19 16:45:19 aclement Exp $ + * @version $Id: InstructionHandle.java,v 1.3 2007/05/22 09:11:40 aclement Exp $ * @author M. Dahm * @see Instruction * @see BranchHandle @@ -120,21 +120,11 @@ public class InstructionHandle implements java.io.Serializable { setInstruction(i); } - private static InstructionHandle ih_list = null; // List of reusable handles /** Factory method. */ static final InstructionHandle getInstructionHandle(Instruction i) { - if(ih_list == null) return new InstructionHandle(i); - else { - InstructionHandle ih = ih_list; - ih_list = ih.next; - - ih.setInstruction(i); - - return ih; - } } /** @@ -163,12 +153,6 @@ public class InstructionHandle implements java.io.Serializable { */ void setPosition(int pos) { i_position = pos; } - /** Overridden in BranchHandle - */ - protected void addHandle() { - next = ih_list; - ih_list = this; - } /** * Delete contents, i.e., remove user access and make handle reusable. @@ -180,7 +164,6 @@ public class InstructionHandle implements java.io.Serializable { i_position = -1; attributes = null; removeAllTargeters(); - addHandle(); } /** Remove all targeters, if any.