[teiid-commits] teiid SVN: r2688 - branches/7.1.x/runtime/src/main/java/org/teiid/deployers.
teiid-commits at lists.jboss.org
teiid-commits at lists.jboss.org
Thu Oct 28 17:21:51 EDT 2010
Author: rareddy
Date: 2010-10-28 17:21:51 -0400 (Thu, 28 Oct 2010)
New Revision: 2688
Modified:
branches/7.1.x/runtime/src/main/java/org/teiid/deployers/SystemVDBDeployer.java
Log:
TEIID-1334: URL class does not care about the spaces in its URL. It does not automatically encode them, However URI class does. Doing URL->URI->URL code to remove the spaces in the URL.
Modified: branches/7.1.x/runtime/src/main/java/org/teiid/deployers/SystemVDBDeployer.java
===================================================================
--- branches/7.1.x/runtime/src/main/java/org/teiid/deployers/SystemVDBDeployer.java 2010-10-28 18:02:05 UTC (rev 2687)
+++ branches/7.1.x/runtime/src/main/java/org/teiid/deployers/SystemVDBDeployer.java 2010-10-28 21:21:51 UTC (rev 2688)
@@ -22,6 +22,7 @@
package org.teiid.deployers;
import java.io.IOException;
+import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
@@ -42,7 +43,9 @@
if (url == null) {
throw new TeiidRuntimeException(RuntimeMetadataPlugin.Util.getString("system_vdb_not_found")); //$NON-NLS-1$
}
- this.vdbRepository.setSystemStore(new IndexMetadataFactory(url).getMetadataStore(null));
+ // uri conversion is only to remove the spaces in URL, note this only with above kind situation
+ URI uri = new URI(url.getProtocol(), url.getPath(), null);
+ this.vdbRepository.setSystemStore(new IndexMetadataFactory(uri.toURL()).getMetadataStore(null));
} catch (URISyntaxException e) {
throw new TeiidRuntimeException(e, RuntimePlugin.Util.getString("system_vdb_load_error")); //$NON-NLS-1$
} catch (IOException e) {
More information about the teiid-commits
mailing list