Uploaded image for project: 'JBoss Modules'
  1. JBoss Modules
  2. MODULES-165

Cannot reliably iterate over Jar/FileResourceLoader

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.2.1.Final, 1.3.0.Beta1
    • 1.2.0.Final
    • Core
    • None

      While working on WFLY-1291 I discovered all sorts of issues with iterateResources(...) on the various ResourceLoaders. This pull request adds a number of tests with associated fixes for Jar/FileResourceLoader.

      I noticed however that the Resource.getName() API is not consistently defined and may return different results depending on how you got the Resource. Should it return the simple file name as it does with ResourceLoader.getResource(...) or the full path as it does with ResourceLoader.iterateResources(...)?

      Not sure how you intended this to work. Here I changed the semantic of VFSResourceLoader.getName() to return the full path. The WildFly test suite still passes, which may suggest that we could settle on full path with little impact.

      An alternative would be to add Resource.getPath() or similar.

              dlloyd@redhat.com David Lloyd
              tdiesler@redhat.com Thomas Diesler
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: