[GRADLE-1279] Junit test class detection includes non-static inner classes Created: 30/Dec/10  Updated: 04/Jan/13  Resolved: 30/Dec/10

Status: Resolved
Project: Gradle
Affects Version/s: 0.9
Fix Version/s: 0.9.1

Type: Bug
Reporter: Russ Egan Assignee: Hans Dockter
Resolution: Fixed Votes: 0


 Description   

Noticed this when building a gradle build for apache commons collections. That project has a bunch of junit test classes which follow this pattern:

AbstractMapTest.java
public abstract class AbstractMapTest extends TestCase {
  public MapTest extends AbstractMapTest {
    // test stuff
  }
}

It's weird, and I'm not even sure how they would work...but that's not really at issue. Gradle detects those inner classes as junit test classes, but it should probably filter any inner classes which are not static, since it is impossible to instantiate them independently.


Generated at Wed Jun 30 11:51:30 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.