jruby/jruby — pull request #1366 by ratnikov (2013-12-27 19:17:06+00:00)
Title: Consolidate various JAR parsing areas into using FileResources.

There are quite a lot of places in current JRuby code where jar:test.jar!foo/bar support is explicitly handled, which leads to plenty of code duplication.

This pull requests does following:

1) Update FileResource interface to replace JRubyFile functionality in most places.
2) Add JarFileResource and JarDirectoryResource resource types, which handle a jar directory entry and jar file entry respectively.
3) Move most of file resource logic from JRubyFile into RegularFileResource, leaving JRubyFile with methods for dealing with real files.
4) Replaces most places where {Jar,Zip}File are used to use resources instead.

TODO (which are not part of this PR):
1) LoadService should be able to use file resources as well, but the logic there is quite hairy, so leaving it for another refactoring day.
2) RubyFile tends to mix resources and JRubyFile which isn't really great.