Project: JDT
Bug 215996 Leak framework: improve failure trace
Reported: 2008-01-21 10:41:12 | Status: verified fixed

We had a leak where we got a quite generic failure trace from the failing test: junit.framework.AssertionFailedError: Expected: 0, actual: 1 Element 0 org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor org.eclipse.ui.texteditor.TextEditorAction#fTextEditor java.lang.Object[9] <== PROBLEM HERE org.eclipse.core.runtime.ListenerList#listeners org.eclipse.core.commands.common.EventManager#listenerList org.eclipse.ui.plugin.AbstractUIPlugin#preferenceStore org.eclipse.osgi.framework.internal.core.BundleContextImpl#activator org.eclipse.osgi.framework.internal.core.BundleHost#context org.eclipse.osgi.framework.internal.core.BundleLoaderProxy#bundle org.eclipse.osgi.framework.internal.core.BundleLoaderProxy[10] org.eclipse.osgi.framework.internal.core.BundleLoader#requiredBundles org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader#delegate org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader ... When I looked at the problem in a profiler I quickly found out that this is caused by the ToggleBreadcrumbAction. When I then looked at the leak framework I found that along with the ReferenceInfo that prints "java.lang.Object[9]" the interesting info (instance of ToggleBreadcrumbAction) was stored in ReferenceInfo.BacklinkNode.fValue but not printed out. Maybe the failure trace can be improved? Test Case: 1. from CVS load BasicJavaEditorActionContributor rev 1.41 2. run JavaLeakTest.testJavaEditorClose()

Files changed in fix:
org.eclipse.jdt.ui.tests/leaks/org/eclipse/jdt/ui/leaktest/ReferenceInfo.java