Project: JDT
Bug 228146 [JUnit] flaw in JUnitPropertyTester.test(...) logic?
Reported: 2008-04-21 23:53:45 | Status: resolved fixed

In the JUnitPropertyTester.test method, there exists the following block of code: } else { // is IAdaptable element= (IJavaElement) ((IAdaptable) receiver).getAdapter(IJavaElement.class); if (element == null) { IResource resource= (IResource) ((IAdaptable) receiver).getAdapter(IResource.class); element = JavaCore.create(resource); if (element == null) { return false; } return false; } } Should the 2nd "return false;" be removed?

Files changed in fix:
org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/JUnitPropertyTester.java org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/JUnitPropertyTester.java