Fixed: Inner test classes were not excluded properly (Carsten Gubernator)
diff --git a/.classpath b/.classpath
index 5bc35ea..bdd0247 100644
--- a/.classpath
+++ b/.classpath
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/main"/>
- <classpathentry kind="src" path="examples/src"/>
<classpathentry kind="src" path="test/src"/>
<classpathentry kind="src" path="src/jdk15"/>
<classpathentry kind="src" path="resources"/>
@@ -10,7 +9,9 @@
<classpathentry kind="lib" path="3rdparty/ant-launcher.jar"/>
<classpathentry kind="lib" path="3rdparty/ant.jar"/>
<classpathentry kind="lib" path="3rdparty/qdox-1.6.1.jar"/>
+ <classpathentry kind="var" path="TOOLS15_LIB"/>
<classpathentry kind="lib" path="3rdparty/backport-util-concurrent-2.2.jar"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="lib" path="/home/cbeust/java/jdk1.5.0_09/jdk1.5.0/lib/tools.jar"/>
<classpathentry kind="output" path="z_build"/>
</classpath>
diff --git a/CHANGES.txt b/CHANGES.txt
index 915e505..9f020b9 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -2,6 +2,7 @@
Added: dataProviderThreadCount can be set from the command line and from ant (Adrian Grealish)
Added: ITestAnnotation#setDataProvider
+Fixed: Inner test classes were not excluded properly (Carsten Gubernator)
Fixed: threadPoolSize without invocationCount was causing reporters not to be invoked
Fixed: A @Factory throwing an exception did not cause any error
Fixed: <classfilesetref> was not working properly in the ant task (Ed Randall)
diff --git a/src/main/org/testng/internal/ClassHelper.java b/src/main/org/testng/internal/ClassHelper.java
index 915467e..e54fd78 100644
--- a/src/main/org/testng/internal/ClassHelper.java
+++ b/src/main/org/testng/internal/ClassHelper.java
@@ -399,6 +399,11 @@
public static <T> T tryOtherConstructor(Class<T> declaringClass) {
T result;
try {
+ // Special case for inner classes
+ if (declaringClass.getModifiers() == 0) {
+ return null;
+ }
+
Constructor<T> ctor = declaringClass.getConstructor(new Class[] { String.class });
result = ctor.newInstance(new Object[] { "Default test name" });
}