As we use this method in a lot of places in our code we need to replace it with
code that generates properly encoded URIs.
Example:
new File("/tmp/a+b").toURL() returns "file:/tmp/a+b". This is incorrect as it
should be "file:/tmp/a%2Bb" instead.
Original issue reported on code.google.com by indiapaleale@gmail.com on 24 Nov 2010 at 7:50