On Sun, Oct 11, 2009 at 3:48 PM, Robert Muir <rcm...@gmail.com> wrote: > Simon, so I don't forget, we also have a custom WordListLoader in > org.apache.lucene.analysis.nl that we can delete for 3.0 (it is deprecated) Saw that already -- thanks for pointing it out again > > For your question though, maybe one idea is to return HashSet/HashMap but > with a comment saying the return value will change to Set/Map in 3.1? > If the user reads this, and treats it as an interface in their code: Map x = > WordListLoader.foo(), would their code still work in 3.1... would they need > to recompile? If they would use the Interface in the assignment they could just drop in though. I would also leave it like it is and change it later though. Its a very minor case and for that reason simply a style issue. I will add a comment that it can change in future releases. Everything else would introduce too many problems for this minor change though.
simon > > On Sat, Oct 10, 2009 at 3:26 PM, Simon Willnauer > <simon.willna...@googlemail.com> wrote: >> >> Hey there, >> >> in the context of https://issues.apache.org/jira/browse/LUCENE-1967 I >> was looking at org.apache.lucene.analysis.WordlistLoader. I noticed >> that all static methods return HashSet / HashMap instead of their >> corresponding interfaces Map / Set. As I'm going to add another static >> helper to this class I was wondering if we should change the concrete >> impl. to interface return values. >> I guess this would break back-compat. for 3.0 so would it make sense >> to mark the current static methods as deprecated and add new ones or >> should we just keep it as it is while not being best practice though. >> >> simon >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org >> For additional commands, e-mail: java-dev-h...@lucene.apache.org >> > > > > -- > Robert Muir > rcm...@gmail.com > --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org For additional commands, e-mail: java-dev-h...@lucene.apache.org