-
-
Save headius/2dd9f99ee30d2d7a8470 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/core/src/main/java/org/jruby/util/JarResource.java b/core/src/main/java/org/jruby/util/JarResource.java | |
index a4d5dfa..98ef0d3 100644 | |
--- a/core/src/main/java/org/jruby/util/JarResource.java | |
+++ b/core/src/main/java/org/jruby/util/JarResource.java | |
@@ -24,6 +24,9 @@ abstract class JarResource implements FileResource { | |
// since pathname is actually an uri we need to decode any url decoded characters like %20 | |
// which happens when directory names contain spaces | |
sanitized = URLDecoder.decode(sanitized, "UTF-8"); | |
+ } catch (IllegalArgumentException iae) { | |
+ // not actually a URL, for whatever reason | |
+ return null; | |
} catch (UnsupportedEncodingException e) { | |
throw new RuntimeException( "hmm - system does not know UTF-8 string encoding :(" ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment