Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7112E9DB5 for ; Thu, 8 Nov 2012 09:05:02 +0000 (UTC) Received: (qmail 10885 invoked by uid 500); 8 Nov 2012 09:05:02 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 10755 invoked by uid 500); 8 Nov 2012 09:05:01 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 10746 invoked by uid 99); 8 Nov 2012 09:05:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Nov 2012 09:05:01 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Nov 2012 09:05:00 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 190582388AA9; Thu, 8 Nov 2012 09:04:40 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: svn commit: r1406970 - in /cxf/branches/2.5.x-fixes: ./ rt/core/src/main/java/org/apache/cxf/catalog/OASISCatalogManager.java Date: Thu, 08 Nov 2012 09:04:40 -0000 To: commits@cxf.apache.org From: ffang@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121108090440.190582388AA9@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: ffang Date: Thu Nov 8 09:04:39 2012 New Revision: 1406970 URL: http://svn.apache.org/viewvc?rev=1406970&view=rev Log: Merged revisions 1406962 via svnmerge from https://svn.apache.org/repos/asf/cxf/branches/2.6.x-fixes ................ r1406962 | ffang | 2012-11-08 16:58:19 +0800 (四, 08 11 2012) | 9 lines Merged revisions 1406958 via svnmerge from https://svn.apache.org/repos/asf/cxf/trunk ........ r1406958 | ffang | 2012-11-08 16:48:30 +0800 (四, 08 11 2012) | 1 line [CXF-4620]Exception at compilation when a 'space' character is present in maven local repository path ........ ................ Modified: cxf/branches/2.5.x-fixes/ (props changed) cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/catalog/OASISCatalogManager.java Propchange: cxf/branches/2.5.x-fixes/ ------------------------------------------------------------------------------ Merged /cxf/trunk:r1406958 Merged /cxf/branches/2.6.x-fixes:r1406962 Propchange: cxf/branches/2.5.x-fixes/ ------------------------------------------------------------------------------ Binary property 'svnmerge-integrated' - no diff available. Modified: cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/catalog/OASISCatalogManager.java URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/catalog/OASISCatalogManager.java?rev=1406970&r1=1406969&r2=1406970&view=diff ============================================================================== --- cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/catalog/OASISCatalogManager.java (original) +++ cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/catalog/OASISCatalogManager.java Thu Nov 8 09:04:39 2012 @@ -144,15 +144,15 @@ public class OASISCatalogManager { Enumeration catalogs = classLoader.getResources(name); while (catalogs.hasMoreElements()) { URL catalogURL = catalogs.nextElement(); - if (!loadedCatalogs.contains(URI.create(catalogURL.toString()))) { + if (!loadedCatalogs.contains(URI.create(replaceWhitespace(catalogURL.toString())))) { ((Catalog)catalog).parseCatalog(catalogURL); - loadedCatalogs.add(URI.create(catalogURL.toString())); + loadedCatalogs.add(URI.create(replaceWhitespace(catalogURL.toString()))); } } } public final void loadCatalog(URL catalogURL) throws IOException { - if (!loadedCatalogs.contains(URI.create(catalogURL.toString())) && catalog != null) { + if (!loadedCatalogs.contains(URI.create(replaceWhitespace(catalogURL.toString()))) && catalog != null) { if ("file".equals(catalogURL.getProtocol())) { try { File file = new File(catalogURL.toURI()); @@ -166,9 +166,16 @@ public class OASISCatalogManager { ((Catalog)catalog).parseCatalog(catalogURL); - loadedCatalogs.add(URI.create(catalogURL.toString())); + loadedCatalogs.add(URI.create(replaceWhitespace(catalogURL.toString()))); } } + + private String replaceWhitespace(String str) { + if (str.contains(" ")) { + str = str.replace(" ", "%20"); + } + return str; + } private static OASISCatalogManager getContextCatalog() { try {