From: Olivier Lamy Date: Wed, 20 Nov 2013 03:15:32 +0000 (+0000) Subject: [MRM-1793] trailing spaces not trimmed in upload form X-Git-Tag: archiva-2.0.0-RC1~199 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ee3ee0a18977b67b6997ea8cd023816201059f96;p=archiva.git [MRM-1793] trailing spaces not trimmed in upload form git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1543704 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultFileUploadService.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultFileUploadService.java index 7d94e112b..77b1c0c06 100644 --- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultFileUploadService.java +++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultFileUploadService.java @@ -210,10 +210,16 @@ public class DefaultFileUploadService return fileMetadatas == null ? Collections.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 fileMetadatas = getSessionFilesList(); if ( fileMetadatas == null || fileMetadatas.isEmpty() ) {