archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1543704 - /archiva/trunk/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultFileUploadService.java
Date Wed, 20 Nov 2013 03:15:32 GMT
Author: olamy
Date: Wed Nov 20 03:15:32 2013
New Revision: 1543704

URL: http://svn.apache.org/r1543704
Log:
[MRM-1793] trailing spaces not trimmed in upload form

Modified:
    archiva/trunk/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultFileUploadService.java

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultFileUploadService.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultFileUploadService.java?rev=1543704&r1=1543703&r2=1543704&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultFileUploadService.java
(original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultFileUploadService.java
Wed Nov 20 03:15:32 2013
@@ -210,10 +210,16 @@ public class DefaultFileUploadService
         return fileMetadatas == null ? Collections.<FileMetadata>emptyList() : fileMetadatas;
     }
 
-    public Boolean save( String repositoryId, final String groupId, final String artifactId,
String version,
-                         String packaging, final boolean generatePom )
+    public Boolean save( String repositoryId, String groupId, String artifactId, String version,
+                         String packaging, boolean generatePom )
         throws ArchivaRestServiceException
     {
+        repositoryId = StringUtils.trim( repositoryId );
+        groupId = StringUtils.trim( groupId );
+        artifactId = StringUtils.trim( artifactId );
+        version = StringUtils.trim( version );
+        packaging = StringUtils.trim( packaging );
+
         List<FileMetadata> fileMetadatas = getSessionFilesList();
         if ( fileMetadatas == null || fileMetadatas.isEmpty() )
         {



Mime
View raw message