[ 
https://issues.apache.org/jira/browse/LUCENE-4268?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Uwe Schindler updated LUCENE-4268:
----------------------------------

    Attachment: LUCENE-4268.patch

Thanks Chris,
attached new patch with test case that checks every combination of file 
resources and classloaders. It also fixes a bug regarding absolute paths.
                
> Rename ResourceAsStreamReasourceLoader to ClasspathResourceLoader, supply 
> simple FilesystemResourceLoader
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-4268
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4268
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/analysis
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: 4.0, 5.0
>
>         Attachments: LUCENE-4268.patch, LUCENE-4268.patch, LUCENE-4268.patch
>
>
> We should rename the class and also fix some bugs:
> - Class/ClassLoader.getResourceAsStream() returns null when resource not 
> found (which is a Java bug in my opinion) and does not throw IOException. 
> SolrResourceLoader throws IOException, the Lucene "example" one should do the 
> same. This prevents NPEs everywhere.
> Improvements:
> - Add no-arg CTOR that uses context class loader instead a given class. This 
> is more what users want. Resource names must then include package name, of 
> course.
> We should also provide a second implementation that allows resource names to 
> be full filesystem paths. I think for loading the resources like custom word 
> list, this is the most wanted implementation. Loading of classes would be 
> delegated to ClassLoader (of course).
> I dont like ResourceLoader also supplying newInstance(), can we remove this 
> for analysis?

--
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

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to