You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Robert Muir (JIRA)" <ji...@apache.org> on 2013/10/01 20:42:24 UTC
[jira] [Updated] (LUCENE-3300) Type safety in Field.setValue()
methods
[ https://issues.apache.org/jira/browse/LUCENE-3300?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Muir updated LUCENE-3300:
--------------------------------
Fix Version/s: (was: Field Type branch)
5.0
> Type safety in Field.setValue() methods
> ---------------------------------------
>
> Key: LUCENE-3300
> URL: https://issues.apache.org/jira/browse/LUCENE-3300
> Project: Lucene - Core
> Issue Type: Improvement
> Reporter: Nikola Tankovic
> Priority: Minor
> Fix For: 5.0
>
>
> setValue methods in Field and subclasses should introduce type safety, beacuse what is now possible is to instantiate a BinaryField and set a non-binary value, but introduce it in such way to be able to preserve the ability to yield setValue(string) on parent Field class, e.g.:
> {code}
> Field b = new BinaryField();
> b.setValue( ..byte[] value.. );
> {code}
> One idea is to use generics:
> {code}
> Field<String> s = new StringField();
> {code}
--
This message was sent by Atlassian JIRA
(v6.1#6144)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org