You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Otis Gospodnetic (JIRA)" <ji...@apache.org> on 2006/12/14 00:02:23 UTC

[jira] Resolved: (LUCENE-681) org.apache.lucene.document.Field is Serializable but doesn't have default constructor

     [ http://issues.apache.org/jira/browse/LUCENE-681?page=all ]

Otis Gospodnetic resolved LUCENE-681.
-------------------------------------

    Resolution: Won't Fix

I think Jed's right.  Plus, calling new Field(), which would now be possible, would give us without the actual information about the field - name, value, tokenized, stored, indexed, etc.


> org.apache.lucene.document.Field is Serializable but doesn't have default constructor
> -------------------------------------------------------------------------------------
>
>                 Key: LUCENE-681
>                 URL: http://issues.apache.org/jira/browse/LUCENE-681
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Other
>    Affects Versions: 1.9, 2.0.0, 2.1, 2.0.1
>         Environment: doesn't depend on environment
>            Reporter: Elijah Epifanov
>            Priority: Critical
>
> when I try to pass Document via network or do anyhing involving serialization/deserialization I will get an exception.
> the following patch should help (Field.java):
>   public Field () {
>   }
>   private void writeObject (java.io.ObjectOutputStream out)
>           throws IOException {
>     out.defaultWriteObject ();
>   }
>   private void readObject (java.io.ObjectInputStream in)
>           throws IOException, ClassNotFoundException {
>     in.defaultReadObject ();
>     if (name == null) {
>       throw new NullPointerException ("name cannot be null");
>     }
>     this.name = name.intern ();        // field names are interned
>   }
> Maybe other classes do not conform to Serialization requirements too...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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