You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2011/02/08 20:05:32 UTC
svn commit: r1068526 [2/2] - in /lucene/dev/trunk: lucene/
lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/
lucene/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/
lucene/contrib/memory/src/java/org/apache/l...
Modified: lucene/dev/trunk/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/Shape.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/Shape.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/Shape.java (original)
+++ lucene/dev/trunk/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/Shape.java Tue Feb 8 19:05:28 2011
@@ -17,7 +17,6 @@
package org.apache.lucene.spatial.tier;
-import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
@@ -26,7 +25,7 @@ import java.util.List;
* flux and might change in incompatible ways in the next
* release.</font>
*/
-public class Shape implements Serializable{
+public class Shape {
private List<Double> area = new ArrayList<Double>();
private String tierId;
Modified: lucene/dev/trunk/lucene/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/NumericRangeFilterBuilder.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/NumericRangeFilterBuilder.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/NumericRangeFilterBuilder.java (original)
+++ lucene/dev/trunk/lucene/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/NumericRangeFilterBuilder.java Tue Feb 8 19:05:28 2011
@@ -154,7 +154,6 @@ public class NumericRangeFilterBuilder i
}
static class NoMatchFilter extends Filter {
- private static final long serialVersionUID = 1L;
@Override
public DocIdSet getDocIdSet(AtomicReaderContext context) throws IOException {
Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/analysis/tokenattributes/CharTermAttributeImpl.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/analysis/tokenattributes/CharTermAttributeImpl.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/analysis/tokenattributes/CharTermAttributeImpl.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/analysis/tokenattributes/CharTermAttributeImpl.java Tue Feb 8 19:05:28 2011
@@ -17,7 +17,6 @@ package org.apache.lucene.analysis.token
* limitations under the License.
*/
-import java.io.Serializable;
import java.nio.CharBuffer;
import org.apache.lucene.util.ArrayUtil;
@@ -30,7 +29,7 @@ import org.apache.lucene.util.UnicodeUti
/**
* The term text of a Token.
*/
-public class CharTermAttributeImpl extends AttributeImpl implements CharTermAttribute, TermToBytesRefAttribute, Cloneable, Serializable {
+public class CharTermAttributeImpl extends AttributeImpl implements CharTermAttribute, TermToBytesRefAttribute, Cloneable {
private static int MIN_BUFFER_SIZE = 10;
private char[] termBuffer = new char[ArrayUtil.oversize(MIN_BUFFER_SIZE, RamUsageEstimator.NUM_BYTES_CHAR)];
Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/analysis/tokenattributes/FlagsAttributeImpl.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/analysis/tokenattributes/FlagsAttributeImpl.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/analysis/tokenattributes/FlagsAttributeImpl.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/analysis/tokenattributes/FlagsAttributeImpl.java Tue Feb 8 19:05:28 2011
@@ -17,8 +17,6 @@ package org.apache.lucene.analysis.token
* limitations under the License.
*/
-import java.io.Serializable;
-
import org.apache.lucene.util.AttributeImpl;
/**
@@ -26,7 +24,7 @@ import org.apache.lucene.util.AttributeI
* eg from one TokenFilter to another one.
* @lucene.experimental While we think this is here to stay, we may want to change it to be a long.
*/
-public class FlagsAttributeImpl extends AttributeImpl implements FlagsAttribute, Cloneable, Serializable {
+public class FlagsAttributeImpl extends AttributeImpl implements FlagsAttribute, Cloneable {
private int flags = 0;
/**
Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/analysis/tokenattributes/OffsetAttributeImpl.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/analysis/tokenattributes/OffsetAttributeImpl.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/analysis/tokenattributes/OffsetAttributeImpl.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/analysis/tokenattributes/OffsetAttributeImpl.java Tue Feb 8 19:05:28 2011
@@ -17,14 +17,12 @@ package org.apache.lucene.analysis.token
* limitations under the License.
*/
-import java.io.Serializable;
-
import org.apache.lucene.util.AttributeImpl;
/**
* The start and end character offset of a Token.
*/
-public class OffsetAttributeImpl extends AttributeImpl implements OffsetAttribute, Cloneable, Serializable {
+public class OffsetAttributeImpl extends AttributeImpl implements OffsetAttribute, Cloneable {
private int startOffset;
private int endOffset;
Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/analysis/tokenattributes/PayloadAttributeImpl.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/analysis/tokenattributes/PayloadAttributeImpl.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/analysis/tokenattributes/PayloadAttributeImpl.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/analysis/tokenattributes/PayloadAttributeImpl.java Tue Feb 8 19:05:28 2011
@@ -17,15 +17,13 @@ package org.apache.lucene.analysis.token
* limitations under the License.
*/
-import java.io.Serializable;
-
import org.apache.lucene.index.Payload;
import org.apache.lucene.util.AttributeImpl;
/**
* The payload of a Token. See also {@link Payload}.
*/
-public class PayloadAttributeImpl extends AttributeImpl implements PayloadAttribute, Cloneable, Serializable {
+public class PayloadAttributeImpl extends AttributeImpl implements PayloadAttribute, Cloneable {
private Payload payload;
/**
Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/analysis/tokenattributes/PositionIncrementAttributeImpl.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/analysis/tokenattributes/PositionIncrementAttributeImpl.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/analysis/tokenattributes/PositionIncrementAttributeImpl.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/analysis/tokenattributes/PositionIncrementAttributeImpl.java Tue Feb 8 19:05:28 2011
@@ -17,8 +17,6 @@ package org.apache.lucene.analysis.token
* limitations under the License.
*/
-import java.io.Serializable;
-
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.util.AttributeImpl;
@@ -46,7 +44,7 @@ import org.apache.lucene.util.AttributeI
*
* </ul>
*/
-public class PositionIncrementAttributeImpl extends AttributeImpl implements PositionIncrementAttribute, Cloneable, Serializable {
+public class PositionIncrementAttributeImpl extends AttributeImpl implements PositionIncrementAttribute, Cloneable {
private int positionIncrement = 1;
/** Set the position increment. The default value is one.
Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/analysis/tokenattributes/TypeAttributeImpl.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/analysis/tokenattributes/TypeAttributeImpl.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/analysis/tokenattributes/TypeAttributeImpl.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/analysis/tokenattributes/TypeAttributeImpl.java Tue Feb 8 19:05:28 2011
@@ -17,14 +17,12 @@ package org.apache.lucene.analysis.token
* limitations under the License.
*/
-import java.io.Serializable;
-
import org.apache.lucene.util.AttributeImpl;
/**
* A Token's lexical type. The Default value is "word".
*/
-public class TypeAttributeImpl extends AttributeImpl implements TypeAttribute, Cloneable, Serializable {
+public class TypeAttributeImpl extends AttributeImpl implements TypeAttribute, Cloneable {
private String type;
public TypeAttributeImpl() {
Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/document/Document.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/document/Document.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/document/Document.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/document/Document.java Tue Feb 8 19:05:28 2011
@@ -35,7 +35,7 @@ import org.apache.lucene.index.IndexRead
* ScoreDoc#doc} or {@link IndexReader#document(int)}.
*/
-public final class Document implements java.io.Serializable {
+public final class Document {
List<Fieldable> fields = new ArrayList<Fieldable>();
private float boost = 1.0f;
Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/document/Field.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/document/Field.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/document/Field.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/document/Field.java Tue Feb 8 19:05:28 2011
@@ -18,7 +18,6 @@ package org.apache.lucene.document;
*/
import java.io.Reader;
-import java.io.Serializable;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.index.IndexWriter;
@@ -32,7 +31,7 @@ import org.apache.lucene.util.StringHelp
index, so that they may be returned with hits on the document.
*/
-public final class Field extends AbstractField implements Fieldable, Serializable {
+public final class Field extends AbstractField implements Fieldable {
/** Specifies whether and how a field should be stored. */
public static enum Store {
Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/document/FieldSelector.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/document/FieldSelector.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/document/FieldSelector.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/document/FieldSelector.java Tue Feb 8 19:05:28 2011
@@ -1,6 +1,5 @@
package org.apache.lucene.document;
-import java.io.Serializable;
/**
* Copyright 2004 The Apache Software Foundation
*
@@ -22,7 +21,7 @@ import java.io.Serializable;
* what Fields get loaded on a {@link Document} by {@link org.apache.lucene.index.IndexReader#document(int,org.apache.lucene.document.FieldSelector)}
*
**/
-public interface FieldSelector extends Serializable {
+public interface FieldSelector {
/**
*
Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/document/Fieldable.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/document/Fieldable.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/document/Fieldable.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/document/Fieldable.java Tue Feb 8 19:05:28 2011
@@ -22,7 +22,6 @@ import org.apache.lucene.search.PhraseQu
import org.apache.lucene.search.spans.SpanQuery; // for javadocs
import java.io.Reader;
-import java.io.Serializable;
/**
* Synonymous with {@link Field}.
@@ -34,7 +33,7 @@ import java.io.Serializable;
* </p>
*
**/
-public interface Fieldable extends Serializable {
+public interface Fieldable {
/** Sets the boost factor hits on this field. This value will be
* multiplied into the score of all hits on this this field of this
* document.
Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/Payload.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/Payload.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/Payload.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/Payload.java Tue Feb 8 19:05:28 2011
@@ -17,8 +17,6 @@ package org.apache.lucene.index;
* limitations under the License.
*/
-import java.io.Serializable;
-
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.util.ArrayUtil;
@@ -34,7 +32,7 @@ import org.apache.lucene.util.ArrayUtil;
* to retrieve the payloads from the index.<br>
*
*/
-public class Payload implements Serializable, Cloneable {
+public class Payload implements Cloneable {
/** the byte array containing the payload data */
protected byte[] data;
Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/Term.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/Term.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/Term.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/Term.java Tue Feb 8 19:05:28 2011
@@ -30,7 +30,7 @@ import org.apache.lucene.util.StringHelp
Note that terms may represent more than words from text fields, but also
things like dates, email addresses, urls, etc. */
-public final class Term implements Comparable<Term>, java.io.Serializable {
+public final class Term implements Comparable<Term> {
String field;
BytesRef bytes;
@@ -199,11 +199,4 @@ public final class Term implements Compa
@Override
public final String toString() { return field + ":" + bytes.utf8ToString(); }
-
- private void readObject(java.io.ObjectInputStream in)
- throws java.io.IOException, ClassNotFoundException
- {
- in.defaultReadObject();
- field = StringHelper.intern(field);
- }
}
Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/TermVectorOffsetInfo.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/TermVectorOffsetInfo.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/TermVectorOffsetInfo.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/TermVectorOffsetInfo.java Tue Feb 8 19:05:28 2011
@@ -1,7 +1,5 @@
package org.apache.lucene.index;
-import java.io.Serializable;
-
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -24,7 +22,7 @@ import java.io.Serializable;
* offset information. This offset information is the character offset as set during the Analysis phase (and thus may not be the actual offset in the
* original content).
*/
-public class TermVectorOffsetInfo implements Serializable {
+public class TermVectorOffsetInfo {
/**
* Convenience declaration when creating a {@link org.apache.lucene.index.TermPositionVector} that stores only position information.
*/
Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/messages/Message.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/messages/Message.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/messages/Message.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/messages/Message.java Tue Feb 8 19:05:28 2011
@@ -17,14 +17,13 @@ package org.apache.lucene.messages;
* limitations under the License.
*/
-import java.io.Serializable;
import java.util.Locale;
/**
* Message Interface for a lazy loading.
* For Native Language Support (NLS), system of software internationalization.
*/
-public interface Message extends Serializable {
+public interface Message {
public String getKey();
Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/messages/MessageImpl.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/messages/MessageImpl.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/messages/MessageImpl.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/messages/MessageImpl.java Tue Feb 8 19:05:28 2011
@@ -25,8 +25,6 @@ import java.util.Locale;
*/
public class MessageImpl implements Message {
- private static final long serialVersionUID = -3077643314630884523L;
-
private String key;
private Object[] arguments = new Object[0];
Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/AutomatonQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/AutomatonQuery.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/AutomatonQuery.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/AutomatonQuery.java Tue Feb 8 19:05:28 2011
@@ -18,7 +18,6 @@ package org.apache.lucene.search;
*/
import java.io.IOException;
-import java.io.Serializable;
import org.apache.lucene.index.Term;
import org.apache.lucene.index.Terms;
@@ -61,7 +60,7 @@ public class AutomatonQuery extends Mult
* in the ctor the query computes one of these, the actual
* implementation depends upon the automaton's structure.
*/
- private abstract class TermsEnumFactory implements Serializable {
+ private abstract class TermsEnumFactory {
protected abstract TermsEnum getTermsEnum(Terms terms, AttributeSource atts) throws IOException;
}
Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/BooleanClause.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/BooleanClause.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/BooleanClause.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/BooleanClause.java Tue Feb 8 19:05:28 2011
@@ -18,7 +18,7 @@ package org.apache.lucene.search;
*/
/** A clause in a BooleanQuery. */
-public class BooleanClause implements java.io.Serializable {
+public class BooleanClause {
/** Specifies how clauses are to occur in matching documents. */
public static enum Occur {
Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/CachingWrapperFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/CachingWrapperFilter.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/CachingWrapperFilter.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/CachingWrapperFilter.java Tue Feb 8 19:05:28 2011
@@ -17,7 +17,6 @@ package org.apache.lucene.search;
* limitations under the License.
*/
-import java.io.Serializable;
import java.io.IOException;
import java.util.Map;
import java.util.WeakHashMap;
@@ -68,7 +67,7 @@ public class CachingWrapperFilter extend
protected final FilterCache<DocIdSet> cache;
- static abstract class FilterCache<T> implements Serializable {
+ static abstract class FilterCache<T> {
/**
* A transient Filter cache (package private because of test)
Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/Explanation.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/Explanation.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/Explanation.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/Explanation.java Tue Feb 8 19:05:28 2011
@@ -17,11 +17,10 @@ package org.apache.lucene.search;
* limitations under the License.
*/
-import java.io.Serializable;
import java.util.ArrayList;
/** Expert: Describes the score computation for document and query. */
-public class Explanation implements java.io.Serializable {
+public class Explanation {
private float value; // the value of this node
private String description; // what it represents
private ArrayList<Explanation> details; // sub-explanations
@@ -135,7 +134,7 @@ public class Explanation implements java
* before storing any large or un-serializable fields.
*
*/
- public static abstract class IDFExplanation implements Serializable {
+ public static abstract class IDFExplanation {
/**
* @return the idf factor
*/
Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/FieldCache.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/FieldCache.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/FieldCache.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/FieldCache.java Tue Feb 8 19:05:28 2011
@@ -29,7 +29,6 @@ import org.apache.lucene.analysis.Numeri
import org.apache.lucene.util.packed.PackedInts;
import java.io.IOException;
-import java.io.Serializable;
import java.io.PrintStream;
import java.text.DecimalFormat;
@@ -61,7 +60,7 @@ public interface FieldCache {
* is used to specify a custom parser to {@link
* SortField#SortField(String, FieldCache.Parser)}.
*/
- public interface Parser extends Serializable {
+ public interface Parser {
}
/** Interface to parse bytes from document fields.
Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/FieldComparatorSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/FieldComparatorSource.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/FieldComparatorSource.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/FieldComparatorSource.java Tue Feb 8 19:05:28 2011
@@ -18,7 +18,6 @@ package org.apache.lucene.search;
*/
import java.io.IOException;
-import java.io.Serializable;
/**
* Provides a {@link FieldComparator} for custom field sorting.
@@ -26,7 +25,7 @@ import java.io.Serializable;
* @lucene.experimental
*
*/
-public abstract class FieldComparatorSource implements Serializable {
+public abstract class FieldComparatorSource {
/**
* Creates a comparator for the field in the given index.
Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/Filter.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/Filter.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/Filter.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/Filter.java Tue Feb 8 19:05:28 2011
@@ -27,7 +27,7 @@ import org.apache.lucene.util.DocIdBitSe
* Abstract base class for restricting which documents may
* be returned during searching.
*/
-public abstract class Filter implements java.io.Serializable {
+public abstract class Filter {
/**
* Creates a {@link DocIdSet} enumerating the documents that should be
Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/MultiTermQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/MultiTermQuery.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/MultiTermQuery.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/MultiTermQuery.java Tue Feb 8 19:05:28 2011
@@ -18,7 +18,6 @@ package org.apache.lucene.search;
*/
import java.io.IOException;
-import java.io.Serializable;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.Term;
@@ -67,7 +66,7 @@ public abstract class MultiTermQuery ext
transient int numberOfTerms = 0;
/** Abstract class that defines how the query is rewritten. */
- public static abstract class RewriteMethod implements Serializable {
+ public static abstract class RewriteMethod {
public abstract Query rewrite(IndexReader reader, MultiTermQuery query) throws IOException;
}
@@ -90,11 +89,6 @@ public abstract class MultiTermQuery ext
result.setBoost(query.getBoost());
return result;
}
-
- // Make sure we are still a singleton even after deserializing
- protected Object readResolve() {
- return CONSTANT_SCORE_FILTER_REWRITE;
- }
};
/** A rewrite method that first translates each term into
@@ -240,11 +234,6 @@ public abstract class MultiTermQuery ext
public void setDocCountPercent(double percent) {
throw new UnsupportedOperationException("Please create a private instance");
}
-
- // Make sure we are still a singleton even after deserializing
- protected Object readResolve() {
- return CONSTANT_SCORE_AUTO_REWRITE_DEFAULT;
- }
};
/**
Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/Query.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/Query.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/Query.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/Query.java Tue Feb 8 19:05:28 2011
@@ -44,7 +44,7 @@ import org.apache.lucene.index.Term;
<li>{@link org.apache.lucene.queryParser.QueryParser QueryParser}
</ul>
*/
-public abstract class Query implements java.io.Serializable, Cloneable {
+public abstract class Query implements Cloneable {
private float boost = 1.0f; // query boost factor
/** Sets the boost for this query clause to <code>b</code>. Documents
Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/ScoreDoc.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/ScoreDoc.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/ScoreDoc.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/ScoreDoc.java Tue Feb 8 19:05:28 2011
@@ -19,7 +19,7 @@ package org.apache.lucene.search;
/** Expert: Returned by low-level search implementations.
* @see TopDocs */
-public class ScoreDoc implements java.io.Serializable {
+public class ScoreDoc {
/** Expert: The score of this document for the query. */
public float score;
Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/Similarity.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/Similarity.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/Similarity.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/Similarity.java Tue Feb 8 19:05:28 2011
@@ -19,7 +19,6 @@ package org.apache.lucene.search;
import java.io.IOException;
-import java.io.Serializable;
import java.util.Collection;
import org.apache.lucene.index.FieldInvertState;
@@ -525,7 +524,7 @@ import org.apache.lucene.util.SmallFloat
* @see org.apache.lucene.index.IndexWriterConfig#setSimilarityProvider(SimilarityProvider)
* @see IndexSearcher#setSimilarityProvider(SimilarityProvider)
*/
-public abstract class Similarity implements Serializable {
+public abstract class Similarity {
public static final int NO_DOC_ID_PROVIDED = -1;
Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/Sort.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/Sort.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/Sort.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/Sort.java Tue Feb 8 19:05:28 2011
@@ -17,7 +17,6 @@ package org.apache.lucene.search;
* limitations under the License.
*/
-import java.io.Serializable;
import java.util.Arrays;
@@ -97,8 +96,7 @@ import java.util.Arrays;
*
* @since lucene 1.4
*/
-public class Sort
-implements Serializable {
+public class Sort {
/**
* Represents sorting by computed relevance. Using this sort criteria returns
Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/SortField.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/SortField.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/SortField.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/SortField.java Tue Feb 8 19:05:28 2011
@@ -18,7 +18,6 @@ package org.apache.lucene.search;
*/
import java.io.IOException;
-import java.io.Serializable;
import java.util.Locale;
import org.apache.lucene.search.cache.*;
@@ -33,8 +32,7 @@ import org.apache.lucene.util.StringHelp
* @since lucene 1.4
* @see Sort
*/
-public class SortField
-implements Serializable {
+public class SortField {
/** Sort by document score (relevance). Sort values are Float and higher
* values are at the front. */
@@ -427,13 +425,6 @@ implements Serializable {
return hash;
}
- // field must be interned after reading from stream
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- in.defaultReadObject();
- if (field != null)
- field = StringHelper.intern(field);
- }
-
/** Returns the {@link FieldComparator} to use for
* sorting.
*
Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/TopDocs.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/TopDocs.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/TopDocs.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/TopDocs.java Tue Feb 8 19:05:28 2011
@@ -20,7 +20,7 @@ package org.apache.lucene.search;
/** Represents hits returned by {@link
* IndexSearcher#search(Query,Filter,int)} and {@link
* IndexSearcher#search(Query,int)}. */
-public class TopDocs implements java.io.Serializable {
+public class TopDocs {
/** The total number of hits for the query.
*/
public int totalHits;
Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/Weight.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/Weight.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/Weight.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/Weight.java Tue Feb 8 19:05:28 2011
@@ -18,7 +18,6 @@ package org.apache.lucene.search;
*/
import java.io.IOException;
-import java.io.Serializable;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.IndexReader.AtomicReaderContext;
@@ -54,7 +53,7 @@ import org.apache.lucene.index.IndexRead
*
* @since 2.9
*/
-public abstract class Weight implements Serializable {
+public abstract class Weight {
/**
* An explanation of the score computation for the named document.
Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/cache/EntryCreator.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/cache/EntryCreator.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/cache/EntryCreator.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/cache/EntryCreator.java Tue Feb 8 19:05:28 2011
@@ -18,7 +18,6 @@ package org.apache.lucene.search.cache;
*/
import java.io.IOException;
-import java.io.Serializable;
import org.apache.lucene.index.IndexReader;
@@ -27,7 +26,7 @@ import org.apache.lucene.index.IndexRead
*
* @lucene.experimental
*/
-public abstract class EntryCreator<T> implements Serializable
+public abstract class EntryCreator<T>
{
public abstract T create( IndexReader reader ) throws IOException;
public abstract T validate( T entry, IndexReader reader ) throws IOException;
Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/function/ValueSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/function/ValueSource.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/function/ValueSource.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/function/ValueSource.java Tue Feb 8 19:05:28 2011
@@ -23,7 +23,6 @@ import org.apache.lucene.index.IndexRead
import org.apache.lucene.search.function.DocValues;
import java.io.IOException;
-import java.io.Serializable;
/**
* Expert: source of values for basic function queries.
@@ -37,7 +36,7 @@ import java.io.Serializable;
*
*
*/
-public abstract class ValueSource implements Serializable {
+public abstract class ValueSource {
/**
* Return the DocValues used by the function query.
Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/payloads/PayloadFunction.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/payloads/PayloadFunction.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/payloads/PayloadFunction.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/search/payloads/PayloadFunction.java Tue Feb 8 19:05:28 2011
@@ -16,7 +16,6 @@ package org.apache.lucene.search.payload
* limitations under the License.
*/
-import java.io.Serializable;
import org.apache.lucene.search.Explanation;
/**
@@ -29,7 +28,7 @@ import org.apache.lucene.search.Explanat
* change
*
**/
-public abstract class PayloadFunction implements Serializable {
+public abstract class PayloadFunction {
/**
* Calculate the score up to this point for this doc and field
Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/store/RAMDirectory.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/store/RAMDirectory.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/store/RAMDirectory.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/store/RAMDirectory.java Tue Feb 8 19:05:28 2011
@@ -19,7 +19,6 @@ package org.apache.lucene.store;
import java.io.IOException;
import java.io.FileNotFoundException;
-import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
@@ -35,10 +34,7 @@ import org.apache.lucene.util.ThreadInte
* implementation is by default the {@link SingleInstanceLockFactory}
* but can be changed with {@link #setLockFactory}.
*/
-public class RAMDirectory extends Directory implements Serializable {
-
- private static final long serialVersionUID = 1l;
-
+public class RAMDirectory extends Directory {
protected final Map<String,RAMFile> fileMap = new ConcurrentHashMap<String,RAMFile>();
protected final AtomicLong sizeInBytes = new AtomicLong();
Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/store/RAMFile.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/store/RAMFile.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/store/RAMFile.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/store/RAMFile.java Tue Feb 8 19:05:28 2011
@@ -18,13 +18,9 @@ package org.apache.lucene.store;
*/
import java.util.ArrayList;
-import java.io.Serializable;
/** @lucene.internal */
-public class RAMFile implements Serializable {
-
- private static final long serialVersionUID = 1l;
-
+public class RAMFile {
protected ArrayList<byte[]> buffers = new ArrayList<byte[]>();
long length;
RAMDirectory directory;
Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/util/AttributeImpl.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/util/AttributeImpl.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/util/AttributeImpl.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/util/AttributeImpl.java Tue Feb 8 19:05:28 2011
@@ -17,7 +17,6 @@ package org.apache.lucene.util;
* limitations under the License.
*/
-import java.io.Serializable;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.lang.ref.WeakReference;
@@ -30,7 +29,7 @@ import java.util.LinkedList;
* Attributes are used to add data in a dynamic, yet type-safe way to a source
* of usually streamed objects, e. g. a {@link org.apache.lucene.analysis.TokenStream}.
*/
-public abstract class AttributeImpl implements Cloneable, Serializable, Attribute {
+public abstract class AttributeImpl implements Cloneable, Attribute {
/**
* Clears the values in this AttributeImpl and resets it to its
* default value. If this implementation implements more than one Attribute interface
Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/util/BytesRef.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/util/BytesRef.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/util/BytesRef.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/util/BytesRef.java Tue Feb 8 19:05:28 2011
@@ -21,14 +21,13 @@ import java.util.Comparator;
import java.io.UnsupportedEncodingException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
-import java.io.Externalizable;
import java.io.IOException;
/** Represents byte[], as a slice (offset + length) into an
* existing byte[].
*
* @lucene.experimental */
-public final class BytesRef implements Comparable<BytesRef>, Externalizable {
+public final class BytesRef implements Comparable<BytesRef> {
static final int HASH_PRIME = 31;
public static final byte[] EMPTY_BYTES = new byte[0];
@@ -365,25 +364,4 @@ public final class BytesRef implements C
return a.length - b.length;
}
}
-
- public void writeExternal(ObjectOutput out)
- throws IOException
- {
- out.writeInt(length);
- if (length > 0) {
- out.write(bytes, offset, length);
- }
- }
-
- public void readExternal( ObjectInput in ) throws
- IOException, ClassNotFoundException {
- length = in.readInt();
- offset = 0;
- if (length > 0) {
- bytes = new byte[length];
- in.read(bytes, 0, length);
- } else {
- bytes = EMPTY_BYTES;
- }
- }
}
Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/util/MapBackedSet.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/util/MapBackedSet.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/util/MapBackedSet.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/util/MapBackedSet.java Tue Feb 8 19:05:28 2011
@@ -17,7 +17,6 @@ package org.apache.lucene.util;
* limitations under the License.
*/
-import java.io.Serializable;
import java.util.AbstractSet;
import java.util.Iterator;
import java.util.Map;
@@ -28,10 +27,7 @@ import java.util.Map;
*
* @lucene.internal
*/
-public final class MapBackedSet<E> extends AbstractSet<E> implements Serializable {
-
- private static final long serialVersionUID = -6761513279741915432L;
-
+public final class MapBackedSet<E> extends AbstractSet<E> {
private final Map<E, Boolean> map;
/**
Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/util/OpenBitSet.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/util/OpenBitSet.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/util/OpenBitSet.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/util/OpenBitSet.java Tue Feb 8 19:05:28 2011
@@ -18,7 +18,6 @@
package org.apache.lucene.util;
import java.util.Arrays;
-import java.io.Serializable;
import org.apache.lucene.search.DocIdSet;
import org.apache.lucene.search.DocIdSetIterator;
@@ -75,7 +74,7 @@ Test system: AMD Opteron, 64 bit linux,
</table>
*/
-public class OpenBitSet extends DocIdSet implements Bits, Cloneable, Serializable {
+public class OpenBitSet extends DocIdSet implements Bits, Cloneable {
protected long[] bits;
protected int wlen; // number of words (elements) used in the array
Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/util/automaton/Automaton.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/util/automaton/Automaton.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/util/automaton/Automaton.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/util/automaton/Automaton.java Tue Feb 8 19:05:28 2011
@@ -29,7 +29,6 @@
package org.apache.lucene.util.automaton;
-import java.io.Serializable;
import java.util.Arrays;
import java.util.BitSet;
import java.util.Collection;
@@ -75,7 +74,7 @@ import org.apache.lucene.util.RamUsageEs
* </p>
* @lucene.experimental
*/
-public class Automaton implements Serializable, Cloneable {
+public class Automaton implements Cloneable {
/**
* Minimize using Hopcroft's O(n log n) algorithm. This is regarded as one of
Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/util/automaton/RunAutomaton.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/util/automaton/RunAutomaton.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/util/automaton/RunAutomaton.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/util/automaton/RunAutomaton.java Tue Feb 8 19:05:28 2011
@@ -29,14 +29,12 @@
package org.apache.lucene.util.automaton;
-import java.io.Serializable;
-
/**
* Finite-state automaton with fast run operation.
*
* @lucene.experimental
*/
-public abstract class RunAutomaton implements Serializable {
+public abstract class RunAutomaton {
final int maxInterval;
final int size;
final boolean[] accept;
Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/util/automaton/State.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/util/automaton/State.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/util/automaton/State.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/util/automaton/State.java Tue Feb 8 19:05:28 2011
@@ -31,7 +31,6 @@ package org.apache.lucene.util.automaton
import org.apache.lucene.util.ArrayUtil;
import org.apache.lucene.util.RamUsageEstimator;
-import java.io.Serializable;
import java.util.Collection;
import java.util.Comparator;
import java.util.Iterator;
@@ -41,7 +40,7 @@ import java.util.Iterator;
*
* @lucene.experimental
*/
-public class State implements Serializable, Comparable<State> {
+public class State implements Comparable<State> {
boolean accept;
public Transition[] transitionsArray;
Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/util/automaton/Transition.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/util/automaton/Transition.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/util/automaton/Transition.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/util/automaton/Transition.java Tue Feb 8 19:05:28 2011
@@ -29,7 +29,6 @@
package org.apache.lucene.util.automaton;
-import java.io.Serializable;
import java.util.Comparator;
/**
@@ -40,7 +39,7 @@ import java.util.Comparator;
*
* @lucene.experimental
*/
-public class Transition implements Serializable, Cloneable {
+public class Transition implements Cloneable {
/*
* CLASS INVARIANT: min<=max
Modified: lucene/dev/trunk/lucene/src/test-framework/org/apache/lucene/search/QueryUtils.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/test-framework/org/apache/lucene/search/QueryUtils.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/test-framework/org/apache/lucene/search/QueryUtils.java (original)
+++ lucene/dev/trunk/lucene/src/test-framework/org/apache/lucene/search/QueryUtils.java Tue Feb 8 19:05:28 2011
@@ -1,10 +1,6 @@
package org.apache.lucene.search;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
import java.util.Random;
import java.lang.reflect.Method;
@@ -102,7 +98,6 @@ public class QueryUtils {
* @see #checkFirstSkipTo
* @see #checkSkipTo
* @see #checkExplanations
- * @see #checkSerialization
* @see #checkEqual
*/
public static void check(Random random, Query q1, IndexSearcher s) {
@@ -124,7 +119,6 @@ public class QueryUtils {
wrapped.close();
}
checkExplanations(q1,s);
- checkSerialization(q1,s);
Query q2 = (Query)q1.clone();
checkEqual(s.rewrite(q1),
@@ -204,31 +198,6 @@ public class QueryUtils {
r.close();
return d;
}
-
-
- /** check that the query weight is serializable.
- * @throws IOException if serialization check fail.
- */
- private static void checkSerialization(Query q, IndexSearcher s) throws IOException {
- Weight w = q.weight(s);
- try {
- ByteArrayOutputStream bos = new ByteArrayOutputStream();
- ObjectOutputStream oos = new ObjectOutputStream(bos);
- oos.writeObject(w);
- oos.close();
- ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(bos.toByteArray()));
- ois.readObject();
- ois.close();
-
- //skip equals() test for now - most weights don't override equals() and we won't add this just for the tests.
- //TestCase.assertEquals("writeObject(w) != w. ("+w+")",w2,w);
-
- } catch (Exception e) {
- IOException e2 = new IOException("Serialization failed for "+w);
- e2.initCause(e);
- throw e2;
- }
- }
/** alternate scorer skipTo(),skipTo(),next(),next(),skipTo(),skipTo(), etc
* and ensure a hitcollector receives same docs and scores
Modified: lucene/dev/trunk/lucene/src/test/org/apache/lucene/search/TestCustomSearcherSort.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/test/org/apache/lucene/search/TestCustomSearcherSort.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/test/org/apache/lucene/search/TestCustomSearcherSort.java (original)
+++ lucene/dev/trunk/lucene/src/test/org/apache/lucene/search/TestCustomSearcherSort.java Tue Feb 8 19:05:28 2011
@@ -17,7 +17,6 @@ package org.apache.lucene.search;
*/
import java.io.IOException;
-import java.io.Serializable;
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.Map;
@@ -34,7 +33,7 @@ import org.apache.lucene.store.Directory
import org.apache.lucene.util.LuceneTestCase;
/** Unit test for sorting code. */
-public class TestCustomSearcherSort extends LuceneTestCase implements Serializable {
+public class TestCustomSearcherSort extends LuceneTestCase {
private Directory index = null;
private IndexReader reader;
Modified: lucene/dev/trunk/lucene/src/test/org/apache/lucene/search/TestSort.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/test/org/apache/lucene/search/TestSort.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/test/org/apache/lucene/search/TestSort.java (original)
+++ lucene/dev/trunk/lucene/src/test/org/apache/lucene/search/TestSort.java Tue Feb 8 19:05:28 2011
@@ -18,7 +18,6 @@ package org.apache.lucene.search;
*/
import java.io.IOException;
-import java.io.Serializable;
import java.text.Collator;
import java.util.ArrayList;
import java.util.BitSet;
@@ -65,7 +64,7 @@ import org.apache.lucene.util._TestUtil;
* @since lucene 1.4
*/
-public class TestSort extends LuceneTestCase implements Serializable {
+public class TestSort extends LuceneTestCase {
private static final int NUM_STRINGS = 6000 * RANDOM_MULTIPLIER;
private IndexSearcher full;
Modified: lucene/dev/trunk/lucene/src/test/org/apache/lucene/store/TestRAMDirectory.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/test/org/apache/lucene/store/TestRAMDirectory.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/test/org/apache/lucene/store/TestRAMDirectory.java (original)
+++ lucene/dev/trunk/lucene/src/test/org/apache/lucene/store/TestRAMDirectory.java Tue Feb 8 19:05:28 2011
@@ -139,18 +139,6 @@ public class TestRAMDirectory extends Lu
writer.close();
}
-
- public void testSerializable() throws IOException {
- Directory dir = new RAMDirectory();
- ByteArrayOutputStream bos = new ByteArrayOutputStream(1024);
- assertEquals("initially empty", 0, bos.size());
- ObjectOutput out = new ObjectOutputStream(bos);
- int headerSize = bos.size();
- out.writeObject(dir);
- out.close();
- assertTrue("contains more then just header", headerSize < bos.size());
- }
-
@Override
public void tearDown() throws Exception {
// cleanup
Modified: lucene/dev/trunk/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/ByteVector.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/ByteVector.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/ByteVector.java (original)
+++ lucene/dev/trunk/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/ByteVector.java Tue Feb 8 19:05:28 2011
@@ -18,14 +18,12 @@
package org.apache.lucene.analysis.compound.hyphenation;
-import java.io.Serializable;
-
/**
* This class implements a simple byte vector with access to the underlying
* array.
* This class has been taken from the Apache FOP project (http://xmlgraphics.apache.org/fop/). They have been slightly modified.
*/
-public class ByteVector implements Serializable {
+public class ByteVector {
/**
* Capacity increment size
Modified: lucene/dev/trunk/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/CharVector.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/CharVector.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/CharVector.java (original)
+++ lucene/dev/trunk/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/CharVector.java Tue Feb 8 19:05:28 2011
@@ -17,15 +17,13 @@
package org.apache.lucene.analysis.compound.hyphenation;
-import java.io.Serializable;
-
/**
* This class implements a simple char vector with access to the underlying
* array.
*
* This class has been taken from the Apache FOP project (http://xmlgraphics.apache.org/fop/). They have been slightly modified.
*/
-public class CharVector implements Cloneable, Serializable {
+public class CharVector implements Cloneable {
/**
* Capacity increment size
Modified: lucene/dev/trunk/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/Hyphen.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/Hyphen.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/Hyphen.java (original)
+++ lucene/dev/trunk/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/Hyphen.java Tue Feb 8 19:05:28 2011
@@ -17,8 +17,6 @@
package org.apache.lucene.analysis.compound.hyphenation;
-import java.io.Serializable;
-
/**
* This class represents a hyphen. A 'full' hyphen is made of 3 parts: the
* pre-break text, post-break text and no-break. If no line-break is generated
@@ -32,7 +30,7 @@ import java.io.Serializable;
* This class has been taken from the Apache FOP project (http://xmlgraphics.apache.org/fop/). They have been slightly modified.
*/
-public class Hyphen implements Serializable {
+public class Hyphen {
public String preBreak;
public String noBreak;
Modified: lucene/dev/trunk/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/HyphenationTree.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/HyphenationTree.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/HyphenationTree.java (original)
+++ lucene/dev/trunk/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/HyphenationTree.java Tue Feb 8 19:05:28 2011
@@ -18,7 +18,6 @@
package org.apache.lucene.analysis.compound.hyphenation;
import java.io.File;
-import java.io.Serializable;
import java.net.MalformedURLException;
import java.util.ArrayList;
import java.util.HashMap;
@@ -31,10 +30,7 @@ import org.xml.sax.InputSource;
*
* This class has been taken from the Apache FOP project (http://xmlgraphics.apache.org/fop/). They have been slightly modified.
*/
-public class HyphenationTree extends TernaryTree implements PatternConsumer,
- Serializable {
-
- private static final long serialVersionUID = -7842107987915665573L;
+public class HyphenationTree extends TernaryTree implements PatternConsumer {
/**
* value space: stores the interletter values
Modified: lucene/dev/trunk/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/TernaryTree.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/TernaryTree.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/TernaryTree.java (original)
+++ lucene/dev/trunk/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/TernaryTree.java Tue Feb 8 19:05:28 2011
@@ -19,7 +19,6 @@ package org.apache.lucene.analysis.compo
import java.util.Enumeration;
import java.util.Stack;
-import java.io.Serializable;
/**
* <h2>Ternary Search Tree.</h2>
@@ -63,7 +62,7 @@ import java.io.Serializable;
* This class has been taken from the Apache FOP project (http://xmlgraphics.apache.org/fop/). They have been slightly modified.
*/
-public class TernaryTree implements Cloneable, Serializable {
+public class TernaryTree implements Cloneable {
/**
* We use 4 arrays to represent a node. I guess I should have created a proper
Modified: lucene/dev/trunk/modules/analysis/icu/src/java/org/apache/lucene/analysis/icu/tokenattributes/ScriptAttributeImpl.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/modules/analysis/icu/src/java/org/apache/lucene/analysis/icu/tokenattributes/ScriptAttributeImpl.java?rev=1068526&r1=1068525&r2=1068526&view=diff
==============================================================================
--- lucene/dev/trunk/modules/analysis/icu/src/java/org/apache/lucene/analysis/icu/tokenattributes/ScriptAttributeImpl.java (original)
+++ lucene/dev/trunk/modules/analysis/icu/src/java/org/apache/lucene/analysis/icu/tokenattributes/ScriptAttributeImpl.java Tue Feb 8 19:05:28 2011
@@ -17,8 +17,6 @@ package org.apache.lucene.analysis.icu.t
* limitations under the License.
*/
-import java.io.Serializable;
-
import org.apache.lucene.util.AttributeImpl;
import org.apache.lucene.util.AttributeReflector;
@@ -29,7 +27,7 @@ import com.ibm.icu.lang.UScript;
* as an integer.
* @lucene.experimental
*/
-public class ScriptAttributeImpl extends AttributeImpl implements ScriptAttribute, Cloneable, Serializable {
+public class ScriptAttributeImpl extends AttributeImpl implements ScriptAttribute, Cloneable {
private int code = UScript.COMMON;
public int getCode() {