Skip to content


Subversion checkout URL

You can clone with
Download ZIP


toURI would cause exception when there is special char in the absolute path #127

merged 1 commit into from

3 participants


such as SPACE.

better use getFile() as it is going to construct a File object.


Is there a test for this, or real use case where this is a problem?


Can simply write a test case which convert URL to URI when there is SPACE would throw URISyntaxException, but I not sure it is a good idea to add that in the repo for this.

Something similar to this page:

@headius headius merged commit c3be423 into jruby:master

If you want to write up a simple test case and put it in a PR, that would be really excellent!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 8, 2012
  1. @arkxu
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/org/jruby/embed/osgi/utils/
2  src/org/jruby/embed/osgi/utils/
@@ -67,7 +67,7 @@ public static File getFileInBundle(Bundle bundle, String path) throws IOExceptio
URL url = null;
try {
url = getFileURL(bundle.getEntry(path));
- return new File(url.toURI());
+ return new File(url.getFile());
} catch (NullPointerException ne) {
throw new IOException("Unable to find the " + path + " folder in the bundle '"
+ bundle.getSymbolicName() + "'; is the org.jruby.jruby bundle unzipped? ");
Something went wrong with that request. Please try again.