diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2009-05-12 07:16:21 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2009-05-12 07:16:21 +0000 |
commit | 9a5389c4c8812ba28abb933a1c7f34eff8393776 (patch) | |
tree | d63444b5b2f372ae37c10b1b07177936614dae6f /java/sca/modules/contribution/src | |
parent | aa23e7ec0543eb18d086743311a889ac5f4e5134 (diff) |
TUSCANY-3015: Fix scanner determination for when contribution file path contains a space
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@773807 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/contribution/src')
-rw-r--r-- | java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/impl/ContributionContentProcessor.java | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/impl/ContributionContentProcessor.java b/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/impl/ContributionContentProcessor.java index 2f39a6d007..9f727866ab 100644 --- a/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/impl/ContributionContentProcessor.java +++ b/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/impl/ContributionContentProcessor.java @@ -20,6 +20,7 @@ package org.apache.tuscany.sca.contribution.processor.impl; import java.io.File; import java.net.URI; +import java.net.URISyntaxException; import java.net.URL; import java.util.List; @@ -114,10 +115,14 @@ public class ContributionContentProcessor implements ExtendedURLArtifactProcesso // Create a contribution scanner ContributionScanner scanner = scanners.getContributionScanner(contributionURL.getProtocol()); if (scanner == null) { - if ("file".equals(contributionURL.getProtocol()) && new File(contributionURL.getFile()).isDirectory()) { - scanner = new DirectoryContributionScanner(); - } else { - scanner = new JarContributionScanner(); + try { + if ("file".equals(contributionURL.getProtocol()) && new File(contributionURL.toURI()).isDirectory()) { + scanner = new DirectoryContributionScanner(); + } else { + scanner = new JarContributionScanner(); + } + } catch (URISyntaxException e) { + throw new ContributionReadException(e); } } |