lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (JIRA)" <>
Subject [jira] [Updated] (LUCENE-4268) Rename ResourceAsStreamReasourceLoader to ClasspathResourceLoader, supply simple FilesystemResourceLoader
Date Sat, 28 Jul 2012 12:44:34 GMT


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:
>             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:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message