diff options
author | mwebster <mwebster> | 2006-08-25 14:37:34 +0000 |
---|---|---|
committer | mwebster <mwebster> | 2006-08-25 14:37:34 +0000 |
commit | 6be70973a704548a42e396e996c9d49915b92a64 (patch) | |
tree | 4326d6c6e9f1bfee97785f7106e7c4664b523b27 /weaver/testsrc | |
parent | 475afa91a3222f6839e7f087760415cc9bb76c98 (diff) | |
download | aspectj-6be70973a704548a42e396e996c9d49915b92a64.tar.gz aspectj-6be70973a704548a42e396e996c9d49915b92a64.zip |
Bug 155148 "jdk14 trace deadlock in oc4j" (use formatObj for _all_ arguments)
Diffstat (limited to 'weaver/testsrc')
-rw-r--r-- | weaver/testsrc/org/aspectj/weaver/AbstractTraceTest.java | 41 |
1 files changed, 37 insertions, 4 deletions
diff --git a/weaver/testsrc/org/aspectj/weaver/AbstractTraceTest.java b/weaver/testsrc/org/aspectj/weaver/AbstractTraceTest.java index 8f895a81b..334690b62 100644 --- a/weaver/testsrc/org/aspectj/weaver/AbstractTraceTest.java +++ b/weaver/testsrc/org/aspectj/weaver/AbstractTraceTest.java @@ -34,23 +34,56 @@ public abstract class AbstractTraceTest extends TestCase { public void testEnterWithThisAndArray() { Object arg1 = new String[] { "s1", "s2" }; Object arg2 = new char[] { 'a', 'b', 'c' }; - trace.enter("testEnterWithThisAndArgs",this,new Object[] { arg1, arg2 }); + trace.enter(getName(),this,new Object[] { arg1, arg2 }); } public void testEnterWithThisAndCollection() { Object arg1 = new ArrayList(); - trace.enter("testEnterWithThisAndArgs",this,new Object[] { arg1 }); + trace.enter(getName(),this,new Object[] { arg1 }); } public void testEnterWithThisAndTraceable () { Object arg1 = new Traceable() { public String toTraceString() { - return "Traceable"; + return getClass().getName() + "[Traceable]"; } }; - trace.enter("testEnterWithThisAndArgs",this,new Object[] { arg1 }); + trace.enter(getName(),this,new Object[] { arg1 }); + } + + public void testEnterWithThisAndToStringException () { + Object arg1 = new Object() { + + public String toString() { + throw new RuntimeException("toString() can throw an Exception"); + } + + }; + trace.enter(getName(),this,new Object[] { arg1 }); + } + + public void testEnterWithThisAndHashCodeException () { + Object arg1 = new Object() { + + public int hashCode() { + throw new RuntimeException("hashCode can throw an Exception"); + } + + }; + trace.enter(getName(),this,new Object[] { arg1 }); + } + + public void testEnterWithThisAndClassLoader () { + Object arg1 = new ClassLoader() { + + public String toString() { + throw new Error("Don't call ClassLoader.toString()"); + } + + }; + trace.enter(getName(),this,new Object[] { arg1 }); } public void testEnterWithThis() { |