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

ResolvingLocaleUrlDefinitionDAO doesn't handle loading from war properly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2.2
    • 2.2.3
    • tiles-core
    • None

    Description

      The BaseLocaleUrlDefinitionDAO does not handle loading view definitions directly from a war bundle properly. In the loadDefinitionsFromURL() call, it catches a FileNotFoundException if a definition is not found, logs a debug message and continues. This is the proper way to handle situations where a view definition has not been defined for a particular locale. However, when loading from a resource URL (e.g. "classpath:/..." or "bundle:/"), if the view definition is not found, a "FileNotFoundException is not thrown, rather an IOException is. A plain IOException is not consumed, but rather thrown, and prevents Tiles from initializing.

      The code is in BaseLocaleUrlDefinitionDAO, line 277. The IOException handling should check if it is a resource not found error and ignore the exception if so.

      Attachments

        1. tilestest.zip
          5 kB
          Bryan Keller
        2. tilestest2.zip
          8 kB
          Bryan Keller
        3. tilestest.war
          44 kB
          Bryan Keller

        Issue Links

          Activity

            People

              brenmcguire Antonio Petrelli
              bryanck Bryan Keller
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: