Bug in JARClassLoader when loading directories as Resources
Submitted by Wednesday, 3 May, 2006 - 18:46
on
Trying to retrieve a directory using:
URL url = class.getResource("org/foo/bar/definitions");
JarURLConnection connection = url.openConnection();
causes an IOException thrown by PluginResURLConnection.connect()
Perhaps the openConnection call shouldn't try to get getResourceAsStream ? Just let the caller validate the Connection's contents. Basically, right now, it seems that retrieving a directory and then iterating through its entries is impossible?
URL url = class.getResource("org/foo/bar/definitions");
JarURLConnection connection = url.openConnection();
causes an IOException thrown by PluginResURLConnection.connect()
Perhaps the openConnection call shouldn't try to get getResourceAsStream ? Just let the caller validate the Connection's contents. Basically, right now, it seems that retrieving a directory and then iterating through its entries is impossible?