[
https://issues.apache.org/jira/browse/LUCENE-5663?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14001363#comment-14001363
]
Shai Erera commented on LUCENE-5663:
------------------------------------
I don't like the shadowing idea. The "open" method, IMO, is not so confusing
case, and in most cases resolved by properly configuring your eclipse settings.
Also, if the method does not explicitly return NIOFSDirectory in its signature,
there's no reason for you to assume that it does ... this is the standard
practice with static "factory" methods.
If it will make it more clear, I would rename to Uwe's suggestion, or a simple
{{create()}}, but I don't think we need to go overboard with shadowing static
methods.
The user who reported it didn't report any real issue, just a misunderstanding
about which instance is created. I don't think that turns the API into
confusing or inconvenient.
> Fix FSDirectory.open API
> ------------------------
>
> Key: LUCENE-5663
> URL: https://issues.apache.org/jira/browse/LUCENE-5663
> Project: Lucene - Core
> Issue Type: Bug
> Reporter: Robert Muir
>
> Spinoff from LUCENE-5658
> {quote}
> This does not use NIOFSDir! open() is a static factory method on FSDirectory,
> just inherited to NIOFSDirectory.
> {quote}
> I think its confusing we have this method on FSDirectory, so its visible in
> subclasses. We should at least consider doing this in another way so its not
> confusing.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]