Skip to content

Commit

Permalink
Fix the issue with spaces into the designer path on "viewer web server"
Browse files Browse the repository at this point in the history
side (part 02, eclipse-birt#1621)
  • Loading branch information
speckyspooky committed Apr 7, 2024
1 parent 82394d1 commit ccf914a
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import org.eclipse.birt.report.viewer.ViewerPlugin;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.URIUtil;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.util.resource.Resource;
import org.eclipse.jetty.util.resource.ResourceFactory;
Expand Down Expand Up @@ -93,17 +94,17 @@ private static Server startAndConfigure(String httpListenOnAddress, int httpServ

for (String xmlFile : configFiles) {
URL url = bundle.getEntry(jettyBase + xmlFile);
URL fileURL = FileLocator.toFileURL(url);
URL fileURL = URIUtil.toURI(FileLocator.toFileURL(url)).toURL();
if (fileURL != null) {
resolvedXmlPaths.add(fileURL);
}
}

URL jettyHomeUrl = bundle.getEntry(JETTY_FOLDER_NAME + "/" + JETTY_HOME_FOLDER_NAME);
URL jettyHomeFileUrl = FileLocator.toFileURL(jettyHomeUrl);
URL jettyHomeFileUrl = URIUtil.toURI(FileLocator.toFileURL(jettyHomeUrl)).toURL();

URL jettyBaseUrl = bundle.getEntry(JETTY_FOLDER_NAME + "/" + JETTY_BASE_FOLDER_NAME);
URL jettyBaseFileUrl = FileLocator.toFileURL(jettyBaseUrl);
URL jettyBaseFileUrl = URIUtil.toURI(FileLocator.toFileURL(jettyBaseUrl)).toURL();

// Lets load our properties
Map<String, String> properties = new HashMap<>();
Expand Down

0 comments on commit ccf914a

Please sign in to comment.