diff options
author | Stephan Herrmann | 2010-06-20 16:59:07 +0000 |
---|---|---|
committer | Stephan Herrmann | 2010-06-20 16:59:07 +0000 |
commit | 6d8e718bd8259c291e0db8a99b1c65c81834c84d (patch) | |
tree | 770fdf49483a864c9460ae0287c87fea73028d2b | |
parent | 739372a368b809c912628b36c7b5a29efec004a2 (diff) | |
download | org.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.java | 3 | ||||
-rw-r--r-- | othersrc/OTRE/src/org/eclipse/objectteams/otre/jplis/ObjectTeamsTransformer.java | 5 |
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; |