You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Nikola Tankovic (JIRA)" <ji...@apache.org> on 2011/07/09 16:03:16 UTC
[jira] [Created] (LUCENE-3300) Type safety in Field.setValue()
methods
Type safety in Field.setValue() methods
---------------------------------------
Key: LUCENE-3300
URL: https://issues.apache.org/jira/browse/LUCENE-3300
Project: Lucene - Java
Issue Type: Improvement
Reporter: Nikola Tankovic
Priority: Minor
Fix For: Field Type branch
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 is automatically generated by JIRA.
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