[ 
https://issues.apache.org/jira/browse/TILES-554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13295684#comment-13295684
 ] 

Nicolas Le Bas commented on TILES-554:
--------------------------------------

Handling IOException instead of FileNotFoundException sounds reasonable to me, 
since the DefinitionsReader cannot throw an IOException.

However I'm not sure if Tiles should allow some the configuration files to be 
missing, the refreshRequired method certainly doesn't. Perhaps this issue 
should be tackled where the l10n is handled (i.e. in LocaleUrlDefinitionDAO, 
not BaseLocaleUrlDefinitionDAO). There are [other 
issues|https://issues.apache.org/jira/browse/TILES-547] with localization in 
2.2, too.

Last but not least this works differently in tiles 3.0. Doesn't mean it works 
with Apache Felix (we've not tested for it).
                
> Compatibility bug in BaseLocaleUrlDefinitionDAO.loadDefinitionsFromURL
> ----------------------------------------------------------------------
>
>                 Key: TILES-554
>                 URL: https://issues.apache.org/jira/browse/TILES-554
>             Project: Tiles
>          Issue Type: Bug
>          Components: tiles-core
>    Affects Versions: 2.2.2
>            Reporter: Silvano Maffeis
>
> 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/%[email protected]%3E

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to