Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Herrmann2010-06-20 16:59:07 +0000
committerStephan Herrmann2010-06-20 16:59:07 +0000
commit6d8e718bd8259c291e0db8a99b1c65c81834c84d (patch)
tree770fdf49483a864c9460ae0287c87fea73028d2b
parent739372a368b809c912628b36c7b5a29efec004a2 (diff)
downloadorg.eclipse.objectteams-6d8e718bd8259c291e0db8a99b1c65c81834c84d.tar.gz
org.eclipse.objectteams-6d8e718bd8259c291e0db8a99b1c65c81834c84d.tar.xz
org.eclipse.objectteams-6d8e718bd8259c291e0db8a99b1c65c81834c84d.zip
Proposed fix for Bug 317381 - [otre] ClassCircularityError in flight bonus example
-rw-r--r--othersrc/OTRE/src/org/eclipse/objectteams/otre/RepositoryAccess.java3
-rw-r--r--othersrc/OTRE/src/org/eclipse/objectteams/otre/jplis/ObjectTeamsTransformer.java5
2 files changed, 6 insertions, 2 deletions
diff --git a/othersrc/OTRE/src/org/eclipse/objectteams/otre/RepositoryAccess.java b/othersrc/OTRE/src/org/eclipse/objectteams/otre/RepositoryAccess.java
index 590a6584b..4a249262d 100644
--- a/othersrc/OTRE/src/org/eclipse/objectteams/otre/RepositoryAccess.java
+++ b/othersrc/OTRE/src/org/eclipse/objectteams/otre/RepositoryAccess.java
@@ -102,6 +102,9 @@ public class RepositoryAccess {
} catch (ClassNotFoundException e) {
// consider classes as incommensurable if they can't both be loaded in the current class loader
return false;
+ } catch (ClassCircularityError e) {
+ // assume that circularity was caused by resolving framework classes during class loading
+ return false;
}
}
diff --git a/othersrc/OTRE/src/org/eclipse/objectteams/otre/jplis/ObjectTeamsTransformer.java b/othersrc/OTRE/src/org/eclipse/objectteams/otre/jplis/ObjectTeamsTransformer.java
index 745174715..9db6ab0b0 100644
--- a/othersrc/OTRE/src/org/eclipse/objectteams/otre/jplis/ObjectTeamsTransformer.java
+++ b/othersrc/OTRE/src/org/eclipse/objectteams/otre/jplis/ObjectTeamsTransformer.java
@@ -110,8 +110,9 @@ public class ObjectTeamsTransformer implements ClassFileTransformer {
ProtectionDomain protectionDomain, byte[] classfileBuffer)
throws IllegalClassFormatException
{
- if (className.startsWith("org/eclipse/objectteams/otre")
- || className.startsWith("org/apache/bcel"))
+ if ( className.startsWith("org/eclipse/objectteams/otre")
+ || className.startsWith("org/apache/bcel")
+ || className.equals("java/util/LinkedHashMap$KeyIterator")) // saw class loading circularity caused by accessing this class
{
// skip OTRE and BCEL classes
return null;

Back to the top