lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Male (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-4268) Rename ResourceAsStreamReasourceLoader to ClasspathResourceLoader, supply simple FilesystemResourceLoader
Date Sat, 28 Jul 2012 11:54:35 GMT

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

Chris Male commented on LUCENE-4268:
------------------------------------

+1
                
> 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
>
>
> 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message