Skip to content
This repository
Browse code

Fixed: Inner test classes were not excluded properly (Carsten Guberna…

…tor)
  • Loading branch information...
commit 6006c867e4ea4519af6c460732013c8d75c7af5b 1 parent 88b7299
authored November 02, 2009
5  .classpath
... ...
@@ -1,7 +1,6 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 2
 <classpath>
3 3
 	<classpathentry kind="src" path="src/main"/>
4  
-	<classpathentry kind="src" path="examples/src"/>
5 4
 	<classpathentry kind="src" path="test/src"/>
6 5
 	<classpathentry kind="src" path="src/jdk15"/>
7 6
 	<classpathentry kind="src" path="resources"/>
@@ -10,7 +9,9 @@
10 9
 	<classpathentry kind="lib" path="3rdparty/ant-launcher.jar"/>
11 10
 	<classpathentry kind="lib" path="3rdparty/ant.jar"/>
12 11
 	<classpathentry kind="lib" path="3rdparty/qdox-1.6.1.jar"/>
  12
+	<classpathentry kind="var" path="TOOLS15_LIB"/>
13 13
 	<classpathentry kind="lib" path="3rdparty/backport-util-concurrent-2.2.jar"/>
14  
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
  14
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
  15
+	<classpathentry kind="lib" path="/home/cbeust/java/jdk1.5.0_09/jdk1.5.0/lib/tools.jar"/>
15 16
 	<classpathentry kind="output" path="z_build"/>
16 17
 </classpath>
1  CHANGES.txt
@@ -2,6 +2,7 @@ Current:
2 2
 
3 3
 Added: dataProviderThreadCount can be set from the command line and from ant (Adrian Grealish)
4 4
 Added: ITestAnnotation#setDataProvider
  5
+Fixed: Inner test classes were not excluded properly (Carsten Gubernator)
5 6
 Fixed: threadPoolSize without invocationCount was causing reporters not to be invoked
6 7
 Fixed: A @Factory throwing an exception did not cause any error
7 8
 Fixed: <classfilesetref> was not working properly in the ant task (Ed Randall)
5  src/main/org/testng/internal/ClassHelper.java
@@ -399,6 +399,11 @@ public static Object createInstance(Class<?> declaringClass,
399 399
   public static <T> T tryOtherConstructor(Class<T> declaringClass) {
400 400
     T result;
401 401
     try {
  402
+      // Special case for inner classes
  403
+      if (declaringClass.getModifiers() == 0) {
  404
+        return null;
  405
+      }
  406
+
402 407
       Constructor<T> ctor = declaringClass.getConstructor(new Class[] { String.class });
403 408
       result = ctor.newInstance(new Object[] { "Default test name" });
404 409
     }

0 notes on commit 6006c86

Please sign in to comment.
Something went wrong with that request. Please try again.