Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Voormann2012-05-24 12:39:04 -0400
committerHolger Voormann2012-05-24 12:39:04 -0400
commit9f27a6f8df70d3d3fe0565d2b9e870f6ed277eb8 (patch)
tree8648e1c07eb0c3015ba218a8e7c539e32dbde491
parent2f027a1dc33f086ec784018b5f5b3877fc0d171c (diff)
downloadorg.eclipse.mylyn.docs.vex-9f27a6f8df70d3d3fe0565d2b9e870f6ed277eb8.tar.gz
org.eclipse.mylyn.docs.vex-9f27a6f8df70d3d3fe0565d2b9e870f6ed277eb8.tar.xz
org.eclipse.mylyn.docs.vex-9f27a6f8df70d3d3fe0565d2b9e870f6ed277eb8.zip
bug 380559: correct blanks in URI
-rw-r--r--org.eclipse.vex.ui/src/org/eclipse/vex/ui/internal/config/ConfigSource.java19
-rw-r--r--org.eclipse.vex.ui/src/org/eclipse/vex/ui/internal/config/DoctypeFactory.java12
2 files changed, 17 insertions, 14 deletions
diff --git a/org.eclipse.vex.ui/src/org/eclipse/vex/ui/internal/config/ConfigSource.java b/org.eclipse.vex.ui/src/org/eclipse/vex/ui/internal/config/ConfigSource.java
index ea024e6e..4c61e090 100644
--- a/org.eclipse.vex.ui/src/org/eclipse/vex/ui/internal/config/ConfigSource.java
+++ b/org.eclipse.vex.ui/src/org/eclipse/vex/ui/internal/config/ConfigSource.java
@@ -235,16 +235,15 @@ public abstract class ConfigSource {
parsedResources.clear();
for (final ConfigItem item : items) {
final URI uri = item.getResourceUri();
- if (!parsedResources.containsKey(uri)) {
- final IConfigItemFactory factory = getConfigItemFactory(item.getExtensionPointId());
- try {
- final Object parsedResource = factory.parseResource(item, getBaseUrl(), uri.toString(), problemHandler);
- if (parsedResource != null)
- parsedResources.put(uri, parsedResource);
- } catch (final IOException ex) {
- final String message = MessageFormat.format(Messages.getString("ConfigSource.errorParsingUri"), new Object[] { uri });
- VexPlugin.getDefault().log(IStatus.ERROR, message, ex);
- }
+ if (uri == null || parsedResources.containsKey(uri)) continue;
+ final IConfigItemFactory factory = getConfigItemFactory(item.getExtensionPointId());
+ try {
+ final Object parsedResource = factory.parseResource(item, getBaseUrl(), uri.toString(), problemHandler);
+ if (parsedResource != null)
+ parsedResources.put(uri, parsedResource);
+ } catch (final IOException ex) {
+ final String message = MessageFormat.format(Messages.getString("ConfigSource.errorParsingUri"), new Object[] { uri });
+ VexPlugin.getDefault().log(IStatus.ERROR, message, ex);
}
}
}
diff --git a/org.eclipse.vex.ui/src/org/eclipse/vex/ui/internal/config/DoctypeFactory.java b/org.eclipse.vex.ui/src/org/eclipse/vex/ui/internal/config/DoctypeFactory.java
index 7db67c73..2d0aca58 100644
--- a/org.eclipse.vex.ui/src/org/eclipse/vex/ui/internal/config/DoctypeFactory.java
+++ b/org.eclipse.vex.ui/src/org/eclipse/vex/ui/internal/config/DoctypeFactory.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* John Krasnay - initial API and implementation
* Igor Jacy Lino Campista - Java 5 warnings fixed (bug 311325)
@@ -70,15 +70,19 @@ public class DoctypeFactory implements IConfigItemFactory {
return doctype;
}
-
+
private static URI newUri(final String uriString) {
try {
- return new URI(uriString);
+
+ // TODO remove ".replaceAll(" ", "%20")" as soon this bug is
+ // fixed in org.eclipse.wst.xml.core
+ return new URI(uriString.replaceAll(" ", "%20"));
+
} catch (URISyntaxException e) {
return null;
}
}
-
+
public String getExtensionPointId() {
return DocumentType.EXTENSION_POINT;
}

Back to the top