diff options
author | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-04-09 06:22:02 +0000 |
---|---|---|
committer | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-04-09 06:22:02 +0000 |
commit | ca8e86acb460069101d2aa95ee299cc1800adc77 (patch) | |
tree | 1e949f880025b74ee9db86911443481a12f96d7a /branches/sca-java-1.x/modules/contribution-impl/src/main | |
parent | 8b8b6376e13e53973b50199b6347bbb30882d20a (diff) |
TUSCANY-2862 - Fixing URI issues when processing jar contributions that had artifacts with space on it's name
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@763524 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.x/modules/contribution-impl/src/main')
-rw-r--r-- | branches/sca-java-1.x/modules/contribution-impl/src/main/java/org/apache/tuscany/sca/contribution/processor/impl/JarContributionProcessor.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/branches/sca-java-1.x/modules/contribution-impl/src/main/java/org/apache/tuscany/sca/contribution/processor/impl/JarContributionProcessor.java b/branches/sca-java-1.x/modules/contribution-impl/src/main/java/org/apache/tuscany/sca/contribution/processor/impl/JarContributionProcessor.java index 3ceb8c2b69..47a0f95687 100644 --- a/branches/sca-java-1.x/modules/contribution-impl/src/main/java/org/apache/tuscany/sca/contribution/processor/impl/JarContributionProcessor.java +++ b/branches/sca-java-1.x/modules/contribution-impl/src/main/java/org/apache/tuscany/sca/contribution/processor/impl/JarContributionProcessor.java @@ -23,6 +23,7 @@ import java.io.IOException; import java.io.InputStream; import java.net.MalformedURLException; import java.net.URI; +import java.net.URISyntaxException; import java.net.URL; import java.util.ArrayList; import java.util.HashSet; @@ -114,7 +115,11 @@ public class JarContributionProcessor implements PackageProcessor { // Return list of URIs List<URI> artifacts = new ArrayList<URI>(); for (String name: names) { - artifacts.add(URI.create(name)); + try { + artifacts.add(new URI(null, name, null)); + } catch (URISyntaxException e) { + throw new IllegalArgumentException("Invalid artifact uri:" + name); + } } return artifacts; |