Title: [40777] trunk/hudson/plugins/fortify360/src/main/java/org/jvnet/hudson/plugins/fortify360/FPRPublisher.java: Bug fix: JENKINS-15535, the plugin now only submit FPR to SSC and run the jobAssignment task if projId is larger than 0
Revision
40777
Author
samngms
Date
2012-11-28 05:19:02 -0500 (Wed, 28 Nov 2012)

Log Message

Bug fix: JENKINS-15535, the plugin now only submit FPR to SSC and run the jobAssignment task if projId is larger than 0

Modified Paths

Diff

Modified: trunk/hudson/plugins/fortify360/src/main/java/org/jvnet/hudson/plugins/fortify360/FPRPublisher.java (40776 => 40777)


--- trunk/hudson/plugins/fortify360/src/main/java/org/jvnet/hudson/plugins/fortify360/FPRPublisher.java	2012-11-28 09:08:53 UTC (rev 40776)
+++ trunk/hudson/plugins/fortify360/src/main/java/org/jvnet/hudson/plugins/fortify360/FPRPublisher.java	2012-11-28 10:19:02 UTC (rev 40777)
@@ -170,7 +170,7 @@
 		summary.save(new File(build.getRootDir(), FPRSummary.FILE_BASENAME));
 		
 		// if the project ID is not null, then we need to upload the FPR to 360 server
-		if ( null != f360projId && DESCRIPTOR.canUploadToF360() ) {
+		if ( null != f360projId && f360projId > 0L && DESCRIPTOR.canUploadToF360() ) {
 			// the FPR may be in remote slave, we need to call launcher to do this for me
 			log.printf("Uploading FPR to Fortify 360 Server at %s\n", DESCRIPTOR.getUrl());
 			try {
@@ -205,7 +205,7 @@
 		}
 		
 		// now do job assignment
-		if ( !StringUtils.isBlank(auditScript) ) {
+		if ( null != f360projId && f360projId > 0L && DESCRIPTOR.canUploadToF360() && !StringUtils.isBlank(auditScript) ) {
 			int sleep = (uploadWaitTime != null) ? uploadWaitTime : 1;
 			log.printf("Sleep for %d minute(s)\n", sleep);
 			sleep = sleep * 60 * 1000; // wait time is in minute(s)

Reply via email to