From ee3ee0a18977b67b6997ea8cd023816201059f96 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Wed, 20 Nov 2013 03:15:32 +0000 Subject: [PATCH] [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 --- .../archiva/web/api/DefaultFileUploadService.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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() ) { -- 2.39.5