lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marc Tinkler (JIRA)" <j...@apache.org>
Subject [jira] Created: (LUCENE-2707) NumericField throws a NotSerializableException when it is serialized, even though it implements Serializable
Date Fri, 15 Oct 2010 14:21:32 GMT
NumericField throws a NotSerializableException when it is serialized, even though it implements
Serializable
------------------------------------------------------------------------------------------------------------

                 Key: LUCENE-2707
                 URL: https://issues.apache.org/jira/browse/LUCENE-2707
             Project: Lucene - Java
          Issue Type: Bug
    Affects Versions: 3.0.2, 2.9.3
            Reporter: Marc Tinkler


NumericField extends from AbstractField, which implements Serializable.
 
NumericField cannot be serialized because it stores the precisionStep in the underlying NumericTokenStream,
which is not serializable.  The NumericTokenStream should either be made serializable, or
made transient in NumericField, and the precisionStep should be stored directly in NumericField,
and recreated on deserialization.

Not entirely related, but the real reason I found this bug was because Field and NumericField
are not cloneable and there is no way to make a copy manually, since there is no getter method
for precisionStep on NumericField, so I thought I was going to be clever and do a "poor man's
clone" by serializing/deserializing a NumericField.  No such luck.



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message