Sure thing.

Jason.

On 1 Mar 07, at 9:58 PM 1 Mar 07, Brett Porter wrote:

I don't believe so, but it's not exactly the best class for 'documented behaviour'. I'd say it'd be better to be safe than sorry and throw in the extra null check.

On 02/03/2007, at 10:37 AM, Jason van Zyl wrote:


On 1 Mar 07, at 9:23 PM 1 Mar 07, Brett Porter wrote:

was the NPE junitArtifact, or baseVersion?


Project with no tests and no reference to junit at all, no junitArtifact. If there was an artifact could the base version be null?

Jason.

- Brett

On 02/03/2007, at 10:09 AM, [EMAIL PROTECTED] wrote:

Author: jvanzyl
Date: Thu Mar  1 18:09:47 2007
New Revision: 513588

URL: http://svn.apache.org/viewvc?view=rev&rev=513588
Log:
SUREFIRE-300 Fixing the NPE for cases where projects have no test cases.

Modified:
maven/surefire/trunk/maven-surefire-plugin/src/main/java/org/ apache/maven/plugin/surefire/SurefirePlugin.java

Modified: maven/surefire/trunk/maven-surefire-plugin/src/main/ java/org/apache/maven/plugin/surefire/SurefirePlugin.java URL: http://svn.apache.org/viewvc/maven/surefire/trunk/maven- surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/ SurefirePlugin.java?view=diff&rev=513588&r1=513587&r2=513588 =================================================================== =========== --- maven/surefire/trunk/maven-surefire-plugin/src/main/java/org/ apache/maven/plugin/surefire/SurefirePlugin.java (original) +++ maven/surefire/trunk/maven-surefire-plugin/src/main/java/org/ apache/maven/plugin/surefire/SurefirePlugin.java Thu Mar 1 18:09:47 2007
@@ -591,7 +591,7 @@
             else
             {
                 String junitDirectoryTestSuite;
- if ( junitArtifact.getBaseVersion().startsWith ( "4" ) ) + if ( junitArtifact != null && junitArtifact.getBaseVersion().startsWith( "4" ) )
                 {
junitDirectoryTestSuite = "org.apache.maven.surefire.junit4.JUnit4DirectoryTestSuite";
                 }




Reply via email to