Bug 915194 - API changed in maven-surefire
Summary: API changed in maven-surefire
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: tycho
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Roland Grunberg
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 913490
TreeView+ depends on / blocked
 
Reported: 2013-02-25 08:28 UTC by Krzysztof Daniel
Modified: 2014-01-13 00:27 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-26 17:23:44 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Eclipse Project 401757 0 None None None Never

Description Krzysztof Daniel 2013-02-25 08:28:51 UTC
I found this commit http://mail-archives.apache.org/mod_mbox/maven-commits/201212.mbox/%3C20121206180221.B7CA5819B18@tyr.zones.apache.org%3E, and the method RunResult#getFailsafe may return null if everything is OK.

This may be a problem, because this null may be returned from the run method here:
return new Integer(OsgiSurefireBooter.run(args));
and cause npe.

Comment 1 Krzysztof Daniel 2013-02-25 10:36:45 UTC
This is the patch (for the future use).

--- tycho-0.16.x/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/src/main/java/org/eclipse/tycho/surefire/osgibooter/OsgiSurefireBooter.java.bak	2013-02-23 21:21:16.000000000 +0100
+++ tycho-0.16.x/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/src/main/java/org/eclipse/tycho/surefire/osgibooter/OsgiSurefireBooter.java	2013-02-23 21:33:27.638911936 +0100
@@ -89,7 +89,7 @@
         RunResult result = ProviderFactory.invokeProvider(null, testClassLoader, surefireClassLoader,
                 createReporterFactory(startupReportConfig), providerConfiguration, false, startupConfiguration, true);
 
-        return result.getFailsafeCode();
+        return result.getFailsafeCode() == null ? 0 : result.getFailsafeCode();
     }
 
     private static ReporterFactory createReporterFactory(StartupReportConfiguration startupReportConfig) {

Comment 2 Roland Grunberg 2013-02-26 17:23:44 UTC
Thanks for committing this (http://pkgs.fedoraproject.org/cgit/tycho.git/diff/tycho-fix-surefire-api-change.patch?id=50c3427c3ecc596af5afd24c094525b61a0ffda8). It looks like we won't need to fix this in f18 as it's making use of the 2.12.4 API. Marking as closed (rawhide).


Note You need to log in before you can comment on or make changes to this bug.