Bug 344350 - [runtime][bcel] NPE in
InstructionList.getInstructionHandles()
Synchronization didn't suffice, remove static field altogether
diff --git a/plugins/org.eclipse.objectteams.otequinox.hook/bcelpatch/org.apache.bcel.generic.BranchHandle.class b/plugins/org.eclipse.objectteams.otequinox.hook/bcelpatch/org.apache.bcel.generic.BranchHandle.class
index 6ac249e..d882ad3 100644
--- a/plugins/org.eclipse.objectteams.otequinox.hook/bcelpatch/org.apache.bcel.generic.BranchHandle.class
+++ b/plugins/org.eclipse.objectteams.otequinox.hook/bcelpatch/org.apache.bcel.generic.BranchHandle.class
Binary files differ
diff --git a/plugins/org.eclipse.objectteams.otequinox.hook/bcelpatch/org.apache.bcel.generic.InstructionHandle.class b/plugins/org.eclipse.objectteams.otequinox.hook/bcelpatch/org.apache.bcel.generic.InstructionHandle.class
index 52432e5..91bfedc 100644
--- a/plugins/org.eclipse.objectteams.otequinox.hook/bcelpatch/org.apache.bcel.generic.InstructionHandle.class
+++ b/plugins/org.eclipse.objectteams.otequinox.hook/bcelpatch/org.apache.bcel.generic.InstructionHandle.class
Binary files differ
diff --git a/plugins/org.eclipse.objectteams.runtime/bcelpatchsrc/org/apache/bcel/generic/BranchHandle.java b/plugins/org.eclipse.objectteams.runtime/bcelpatchsrc/org/apache/bcel/generic/BranchHandle.java
index 2291b5a..b871166 100755
--- a/plugins/org.eclipse.objectteams.runtime/bcelpatchsrc/org/apache/bcel/generic/BranchHandle.java
+++ b/plugins/org.eclipse.objectteams.runtime/bcelpatchsrc/org/apache/bcel/generic/BranchHandle.java
@@ -58,27 +58,9 @@
/** Factory methods.
*/
- private static BranchHandle bh_list = null; // List of reusable handles
-
- synchronized static final BranchHandle getBranchHandle( BranchInstruction i ) {
- if (bh_list == null) {
- return new BranchHandle(i);
- }
- 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() {
- synchronized (BranchHandle.class) {
- next = bh_list;
- bh_list = this;
- }
+ static final BranchHandle getBranchHandle( BranchInstruction i ) {
+ return new BranchHandle(i);
}
diff --git a/plugins/org.eclipse.objectteams.runtime/bcelpatchsrc/org/apache/bcel/generic/InstructionHandle.java b/plugins/org.eclipse.objectteams.runtime/bcelpatchsrc/org/apache/bcel/generic/InstructionHandle.java
index 0b8d416..11b381f 100755
--- a/plugins/org.eclipse.objectteams.runtime/bcelpatchsrc/org/apache/bcel/generic/InstructionHandle.java
+++ b/plugins/org.eclipse.objectteams.runtime/bcelpatchsrc/org/apache/bcel/generic/InstructionHandle.java
@@ -117,20 +117,10 @@
setInstruction(i);
}
- private static InstructionHandle ih_list = null; // List of reusable handles
-
-
/** Factory method.
*/
- synchronized 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;
- }
+ static final InstructionHandle getInstructionHandle( Instruction i ) {
+ return new InstructionHandle(i);
}
@@ -166,17 +156,6 @@
i_position = pos;
}
-
- /** Overridden in BranchHandle
- */
- protected void addHandle() {
- synchronized (InstructionHandle.class) {
- next = ih_list;
- ih_list = this;
- }
- }
-
-
/**
* Delete contents, i.e., remove user access and make handle reusable.
*/
@@ -187,7 +166,6 @@
i_position = -1;
attributes = null;
removeAllTargeters();
- addHandle();
}
diff --git a/releng/map/otdt.map b/releng/map/otdt.map
index 4d934e6..2be6890 100644
--- a/releng/map/otdt.map
+++ b/releng/map/otdt.map
@@ -19,7 +19,7 @@
plugin@org.eclipse.objectteams.otdt.metrics,0.7.0=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=plugins/org.eclipse.objectteams.otdt.metrics,tag=builds/201101290806
plugin@org.eclipse.objectteams.runtime=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=plugins/org.eclipse.objectteams.runtime,tag=builds/201201311800
-fragment@org.eclipse.objectteams.otequinox.hook,2.1.0=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=plugins/org.eclipse.objectteams.otequinox.hook,tag=builds/201201311800
+fragment@org.eclipse.objectteams.otequinox.hook,2.1.0=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=plugins/org.eclipse.objectteams.otequinox.hook
fragment@org.eclipse.objectteams.otequinox.sunjvm,2.0.0=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=plugins/org.eclipse.objectteams.otequinox.sunjvm,tag=builds/201109201811
!the following is also referenced in otdt.doc/buildDoc.xml (plugin-name without version):
plugin@org.eclipse.objectteams.otequinox=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=plugins/org.eclipse.objectteams.otequinox,tag=builds/201201311800