Title: [41251] trunk/hudson/plugins/klaros-testmanagement/src/main/java/hudson/plugins/klaros/KlarosTestResultPublisher.java: This fixes JENKINS-15744 (Whitespaces at the end of input fields leads to bogus file upload).
Revision
41251
Author
stolp
Date
2015-03-21 12:37:01 -0400 (Sat, 21 Mar 2015)

Log Message

This fixes JENKINS-15744 (Whitespaces at the end of input fields leads to bogus file upload).

Modified Paths

Diff

Modified: trunk/hudson/plugins/klaros-testmanagement/src/main/java/hudson/plugins/klaros/KlarosTestResultPublisher.java (41250 => 41251)


--- trunk/hudson/plugins/klaros-testmanagement/src/main/java/hudson/plugins/klaros/KlarosTestResultPublisher.java	2015-03-21 16:14:35 UTC (rev 41250)
+++ trunk/hudson/plugins/klaros-testmanagement/src/main/java/hudson/plugins/klaros/KlarosTestResultPublisher.java	2015-03-21 16:37:01 UTC (rev 41251)
@@ -57,6 +57,7 @@
 import org.apache.commons.httpclient.methods.PutMethod;
 import org.apache.commons.httpclient.methods.RequestEntity;
 import org.apache.commons.httpclient.methods.StringRequestEntity;
+import org.apache.commons.lang.StringUtils;
 import org.apache.tools.ant.DirectoryScanner;
 import org.apache.tools.ant.types.FileSet;
 import org.kohsuke.stapler.AncestorInPath;
@@ -153,7 +154,7 @@
      */
     public void setConfig(final String value) {
 
-        config = value;
+        config = StringUtils.trim(value);
     }
 
     /**
@@ -173,7 +174,7 @@
      */
     public void setEnv(final String value) {
 
-        env = value;
+        env = StringUtils.trim(value);
     }
 
     /**
@@ -193,7 +194,7 @@
      */
     public void setUrl(final String value) {
 
-        url = ""
+        url = ""
     }
 
     /**
@@ -213,7 +214,7 @@
      */
     public void setUsername(final String value) {
 
-        username = value;
+        username = StringUtils.trim(value);
     }
 
     /**
@@ -233,7 +234,7 @@
      */
     public void setPassword(final String value) {
 
-        password = value;
+        password = StringUtils.trim(value);
     }
 
     /**
@@ -253,7 +254,7 @@
      */
     public void setSut(final String value) {
 
-        sut = value;
+        sut = StringUtils.trim(value);
     }
 
     /**
@@ -273,7 +274,7 @@
      */
     public void setPathTestResults(final String value) {
 
-        pathTestResults = value;
+        pathTestResults = StringUtils.trim(value);
     }
 
     /**

--
You received this message because you are subscribed to the Google Groups "Jenkins Commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-commits+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to