Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Herrmann2012-01-26 21:27:05 +0000
committerStephan Herrmann2012-01-26 21:27:05 +0000
commit30108748ac5742304b5685d3f7c1be880ff0735d (patch)
tree5c91f505f4c792442dfb30ef239634a703e7e31f /plugins
parent7d0c1e26fdbe1c4172b99af82bc6fad00306ee0e (diff)
downloadorg.eclipse.objectteams-30108748ac5742304b5685d3f7c1be880ff0735d.tar.gz
org.eclipse.objectteams-30108748ac5742304b5685d3f7c1be880ff0735d.tar.xz
org.eclipse.objectteams-30108748ac5742304b5685d3f7c1be880ff0735d.zip
Bug 344350 - [runtime][bcel] NPE in
InstructionList.getInstructionHandles() Move bcel patch files from hook (where it interfered with class loading / package export) to otre
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.objectteams.otequinox.hook/bcelpatch/org.apache.bcel.generic.BranchHandle.patchbin2597 -> 0 bytes
-rw-r--r--plugins/org.eclipse.objectteams.otequinox.hook/bcelpatch/org.apache.bcel.generic.InstructionHandle.patchbin5309 -> 0 bytes
-rw-r--r--plugins/org.eclipse.objectteams.otequinox.hook/build.properties3
-rw-r--r--plugins/org.eclipse.objectteams.otequinox.hook/src/org/eclipse/objectteams/otequinox/internal/hook/TransformerHook.java9
-rw-r--r--plugins/org.eclipse.objectteams.runtime/.classpath2
5 files changed, 7 insertions, 7 deletions
diff --git a/plugins/org.eclipse.objectteams.otequinox.hook/bcelpatch/org.apache.bcel.generic.BranchHandle.patch b/plugins/org.eclipse.objectteams.otequinox.hook/bcelpatch/org.apache.bcel.generic.BranchHandle.patch
deleted file mode 100644
index 6ac249ec6..000000000
--- a/plugins/org.eclipse.objectteams.otequinox.hook/bcelpatch/org.apache.bcel.generic.BranchHandle.patch
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.objectteams.otequinox.hook/bcelpatch/org.apache.bcel.generic.InstructionHandle.patch b/plugins/org.eclipse.objectteams.otequinox.hook/bcelpatch/org.apache.bcel.generic.InstructionHandle.patch
deleted file mode 100644
index 52432e587..000000000
--- a/plugins/org.eclipse.objectteams.otequinox.hook/bcelpatch/org.apache.bcel.generic.InstructionHandle.patch
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.objectteams.otequinox.hook/build.properties b/plugins/org.eclipse.objectteams.otequinox.hook/build.properties
index 3ccfbe89f..293aa982b 100644
--- a/plugins/org.eclipse.objectteams.otequinox.hook/build.properties
+++ b/plugins/org.eclipse.objectteams.otequinox.hook/build.properties
@@ -2,8 +2,7 @@ output.. = bin/
bin.includes = .,\
META-INF/,\
plugin.properties,\
- about.html,\
- bcelpatch/
+ about.html
jars.compile.order = .
source.. = src/
javacProjectSettings = true
diff --git a/plugins/org.eclipse.objectteams.otequinox.hook/src/org/eclipse/objectteams/otequinox/internal/hook/TransformerHook.java b/plugins/org.eclipse.objectteams.otequinox.hook/src/org/eclipse/objectteams/otequinox/internal/hook/TransformerHook.java
index 32059da06..1adba08a5 100644
--- a/plugins/org.eclipse.objectteams.otequinox.hook/src/org/eclipse/objectteams/otequinox/internal/hook/TransformerHook.java
+++ b/plugins/org.eclipse.objectteams.otequinox.hook/src/org/eclipse/objectteams/otequinox/internal/hook/TransformerHook.java
@@ -113,7 +113,7 @@ public class TransformerHook implements ClassLoadingHook, BundleWatcher, ClassLo
// As an OSGI extension bundle, we can't depend on the transformer plugin, so we have to hardcode this
public static final String TRANSFORMER_PLUGIN_ID = "org.eclipse.objectteams.otequinox";
- private static final String TRANSFORMER_HOOK_ID = "org.eclipse.objectteams.otequinox.hook";
+ private static final String OTRE_ID = "org.eclipse.objectteams.runtime";
private static final String WORKSPACE_INITIALIZER_PLUGIN_ID = "org.eclipse.objectteams.otdt.earlyui";
private static final String OTDT_QUALIFIER = "OTDT";
@@ -122,7 +122,6 @@ public class TransformerHook implements ClassLoadingHook, BundleWatcher, ClassLo
// this one requires hot-fixing:
private static final String BCEL_PLUGIN_ID = "org.apache.bcel";
- private static final String BCEL_PATH_DIR = "bcelpatch/";
// specific action may be required when this class is loaded:
private static final String ORG_OBJECTTEAMS_TEAM = "org.objectteams.Team";
@@ -435,8 +434,10 @@ public class TransformerHook implements ClassLoadingHook, BundleWatcher, ClassLo
}
}
if (shouldPatch) {
- Bundle transformer = this.packageAdmin.getBundles(TRANSFORMER_HOOK_ID, null)[0];
- URL entry = transformer.getEntry(BCEL_PATH_DIR+name+".patch");
+ Bundle otre = this.packageAdmin.getBundles(OTRE_ID, null)[0];
+ URL entry = otre.getEntry(name.replace('.', '/')+".class"); // binary bundle: search in the jar root
+ if (entry == null)
+ entry = otre.getEntry("bin/"+name.replace('.', '/')+".class"); // workspace bundle: search in the bin folder
InputStream stream = null;
try {
stream = entry.openStream();
diff --git a/plugins/org.eclipse.objectteams.runtime/.classpath b/plugins/org.eclipse.objectteams.runtime/.classpath
index bd0e74a0f..39f1864a1 100644
--- a/plugins/org.eclipse.objectteams.runtime/.classpath
+++ b/plugins/org.eclipse.objectteams.runtime/.classpath
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="src" output="bcelpatchbin" path="bcelpatchsrc"/>
+ <classpathentry kind="src" path="bcelpatchsrc"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>

Back to the top