MinecraftForge / AccessTransformers

Antlr4 definition for MCP / Forge Access Transformers
GNU Lesser General Public License v2.1
14 stars 12 forks source link

passing a raw URI will fail with illegal characters #3

Closed srs-bsns closed 5 years ago

srs-bsns commented 5 years ago

The change made here: https://github.com/MinecraftForge/AccessTransformers/commit/a1299067a246a1511cce96438e61e1932c19c231#diff-e18569b5f9474160905441560c36752eR81

        final URI outJarURI = URI.create("jar:"+toUri.getScheme()+":"+toUri.getPath());

will try to create a new URI with an unencoded path string that may contain illegal characters, which will cause URI#Create to fail.

This can be fixed by returning the result from URI#toASCIIString which encodes it if neccessary:

        final URI outJarURI = URI.create("jar:"+toUri.toASCIIString());
cpw commented 5 years ago

Thanks, will fix.. unless you PR it first