Uploaded image for project: 'Tiles'
  1. Tiles
  2. TILES-554

Compatibility bug in BaseLocaleUrlDefinitionDAO.loadDefinitionsFromURL

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.2.2
    • None
    • tiles-core
    • None

    Description

      I found a compatibility issue when running tiles under Apache Felix.
      The Tiles method BaseLocaleUrlDefinitionDAO.loadDefinitionsFromURL(URL url)
      assumes a FileNotFoundException is thrown by the underlying URL handler, when the resource pointed to by the URL cannot be found. However,
      a URL does not necessarily have to denote a file in the filesystem.
      Therefore I think you should not expect a FileNotFoundException here.

      Therefore the Apache Felix URL loader will through a IOException,
      and not a FileNotFoundException. Therefore the finding of localized
      resources will fail when running Tile under Apache Felix.

      Proposed fix: Can BaseLocaleUrlDefinitionDAO.loadDefinitionsFromURL be changed, so that only IOException is treated, the same way as you currently treat FileNotFoundException?

      Actually the Apache Felix folks think the current Felix URL handler implementation (throwing IOException and not FileNotFoundException!) is correct:

      http://mail-archives.apache.org/mod_mbox/felix-users/201202.mbox/%3C4F3305CF.9040707@ungoverned.org%3E

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              maffeis Silvano Maffeis
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: