Index: modules/analysis/icu/src/java/org/apache/lucene/analysis/icu/tokenattributes/ScriptAttributeImpl.java =================================================================== --- modules/analysis/icu/src/java/org/apache/lucene/analysis/icu/tokenattributes/ScriptAttributeImpl.java (revision 1067678) +++ modules/analysis/icu/src/java/org/apache/lucene/analysis/icu/tokenattributes/ScriptAttributeImpl.java (working copy) @@ -17,8 +17,6 @@ * limitations under the License. */ -import java.io.Serializable; - import org.apache.lucene.util.AttributeImpl; import org.apache.lucene.util.AttributeReflector; @@ -29,7 +27,7 @@ * 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() { Index: modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/CharVector.java =================================================================== --- modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/CharVector.java (revision 1067678) +++ modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/CharVector.java (working copy) @@ -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 Index: modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/TernaryTree.java =================================================================== --- modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/TernaryTree.java (revision 1067678) +++ modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/TernaryTree.java (working copy) @@ -19,7 +19,6 @@ import java.util.Enumeration; import java.util.Stack; -import java.io.Serializable; /** *

Ternary Search Tree.

@@ -63,7 +62,7 @@ * 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 Index: modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/ByteVector.java =================================================================== --- modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/ByteVector.java (revision 1067678) +++ modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/ByteVector.java (working copy) @@ -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 Index: modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/HyphenationTree.java =================================================================== --- modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/HyphenationTree.java (revision 1067678) +++ modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/HyphenationTree.java (working copy) @@ -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,11 +30,8 @@ * * 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 { +public class HyphenationTree extends TernaryTree implements PatternConsumer { - private static final long serialVersionUID = -7842107987915665573L; - /** * value space: stores the interletter values */ Index: modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/Hyphen.java =================================================================== --- modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/Hyphen.java (revision 1067678) +++ modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/Hyphen.java (working copy) @@ -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 @@ * 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; Index: lucene/src/test/org/apache/lucene/search/TestSort.java =================================================================== --- lucene/src/test/org/apache/lucene/search/TestSort.java (revision 1067678) +++ lucene/src/test/org/apache/lucene/search/TestSort.java (working copy) @@ -18,7 +18,6 @@ */ import java.io.IOException; -import java.io.Serializable; import java.text.Collator; import java.util.ArrayList; import java.util.BitSet; @@ -65,7 +64,7 @@ * @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; Index: lucene/src/test/org/apache/lucene/search/TestCustomSearcherSort.java =================================================================== --- lucene/src/test/org/apache/lucene/search/TestCustomSearcherSort.java (revision 1067678) +++ lucene/src/test/org/apache/lucene/search/TestCustomSearcherSort.java (working copy) @@ -17,7 +17,6 @@ */ 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.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; Index: lucene/src/test/org/apache/lucene/search/QueryUtils.java =================================================================== --- lucene/src/test/org/apache/lucene/search/QueryUtils.java (revision 1067678) +++ lucene/src/test/org/apache/lucene/search/QueryUtils.java (working copy) @@ -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; @@ -124,7 +120,6 @@ wrapped.close(); } checkExplanations(q1,s); - checkSerialization(q1,s); Query q2 = (Query)q1.clone(); checkEqual(s.rewrite(q1), @@ -205,31 +200,6 @@ 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 */ Index: lucene/src/test/org/apache/lucene/store/TestRAMDirectory.java =================================================================== --- lucene/src/test/org/apache/lucene/store/TestRAMDirectory.java (revision 1067678) +++ lucene/src/test/org/apache/lucene/store/TestRAMDirectory.java (working copy) @@ -139,18 +139,6 @@ 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 Index: lucene/src/java/org/apache/lucene/analysis/tokenattributes/PayloadAttributeImpl.java =================================================================== --- lucene/src/java/org/apache/lucene/analysis/tokenattributes/PayloadAttributeImpl.java (revision 1067678) +++ lucene/src/java/org/apache/lucene/analysis/tokenattributes/PayloadAttributeImpl.java (working copy) @@ -17,15 +17,13 @@ * 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; /** Index: lucene/src/java/org/apache/lucene/analysis/tokenattributes/FlagsAttributeImpl.java =================================================================== --- lucene/src/java/org/apache/lucene/analysis/tokenattributes/FlagsAttributeImpl.java (revision 1067678) +++ lucene/src/java/org/apache/lucene/analysis/tokenattributes/FlagsAttributeImpl.java (working copy) @@ -17,8 +17,6 @@ * limitations under the License. */ -import java.io.Serializable; - import org.apache.lucene.util.AttributeImpl; /** @@ -26,7 +24,7 @@ * 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; /** Index: lucene/src/java/org/apache/lucene/analysis/tokenattributes/CharTermAttributeImpl.java =================================================================== --- lucene/src/java/org/apache/lucene/analysis/tokenattributes/CharTermAttributeImpl.java (revision 1067678) +++ lucene/src/java/org/apache/lucene/analysis/tokenattributes/CharTermAttributeImpl.java (working copy) @@ -17,7 +17,6 @@ * limitations under the License. */ -import java.io.Serializable; import java.nio.CharBuffer; import org.apache.lucene.util.ArrayUtil; @@ -30,7 +29,7 @@ /** * 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)]; Index: lucene/src/java/org/apache/lucene/analysis/tokenattributes/PositionIncrementAttributeImpl.java =================================================================== --- lucene/src/java/org/apache/lucene/analysis/tokenattributes/PositionIncrementAttributeImpl.java (revision 1067678) +++ lucene/src/java/org/apache/lucene/analysis/tokenattributes/PositionIncrementAttributeImpl.java (working copy) @@ -17,8 +17,6 @@ * limitations under the License. */ -import java.io.Serializable; - import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.util.AttributeImpl; @@ -46,7 +44,7 @@ * * */ -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. Index: lucene/src/java/org/apache/lucene/analysis/tokenattributes/TypeAttributeImpl.java =================================================================== --- lucene/src/java/org/apache/lucene/analysis/tokenattributes/TypeAttributeImpl.java (revision 1067678) +++ lucene/src/java/org/apache/lucene/analysis/tokenattributes/TypeAttributeImpl.java (working copy) @@ -17,14 +17,12 @@ * 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() { Index: lucene/src/java/org/apache/lucene/analysis/tokenattributes/OffsetAttributeImpl.java =================================================================== --- lucene/src/java/org/apache/lucene/analysis/tokenattributes/OffsetAttributeImpl.java (revision 1067678) +++ lucene/src/java/org/apache/lucene/analysis/tokenattributes/OffsetAttributeImpl.java (working copy) @@ -17,14 +17,12 @@ * 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; Index: lucene/src/java/org/apache/lucene/search/FieldCache.java =================================================================== --- lucene/src/java/org/apache/lucene/search/FieldCache.java (revision 1067678) +++ lucene/src/java/org/apache/lucene/search/FieldCache.java (working copy) @@ -29,7 +29,6 @@ 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 @@ * 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. Index: lucene/src/java/org/apache/lucene/search/MultiTermQuery.java =================================================================== --- lucene/src/java/org/apache/lucene/search/MultiTermQuery.java (revision 1067678) +++ lucene/src/java/org/apache/lucene/search/MultiTermQuery.java (working copy) @@ -18,7 +18,6 @@ */ import java.io.IOException; -import java.io.Serializable; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.Term; @@ -67,7 +66,7 @@ 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 @@ 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 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; - } }; /** Index: lucene/src/java/org/apache/lucene/search/cache/EntryCreator.java =================================================================== --- lucene/src/java/org/apache/lucene/search/cache/EntryCreator.java (revision 1067678) +++ lucene/src/java/org/apache/lucene/search/cache/EntryCreator.java (working copy) @@ -18,7 +18,6 @@ */ import java.io.IOException; -import java.io.Serializable; import org.apache.lucene.index.IndexReader; @@ -27,7 +26,7 @@ * * @lucene.experimental */ -public abstract class EntryCreator implements Serializable +public abstract class EntryCreator { public abstract T create( IndexReader reader ) throws IOException; public abstract T validate( T entry, IndexReader reader ) throws IOException; Index: lucene/src/java/org/apache/lucene/search/Filter.java =================================================================== --- lucene/src/java/org/apache/lucene/search/Filter.java (revision 1067678) +++ lucene/src/java/org/apache/lucene/search/Filter.java (working copy) @@ -27,7 +27,7 @@ * 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 Index: lucene/src/java/org/apache/lucene/search/Similarity.java =================================================================== --- lucene/src/java/org/apache/lucene/search/Similarity.java (revision 1067678) +++ lucene/src/java/org/apache/lucene/search/Similarity.java (working copy) @@ -19,7 +19,6 @@ import java.io.IOException; -import java.io.Serializable; import java.util.Collection; import org.apache.lucene.index.FieldInvertState; @@ -525,7 +524,7 @@ * @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; Index: lucene/src/java/org/apache/lucene/search/payloads/PayloadFunction.java =================================================================== --- lucene/src/java/org/apache/lucene/search/payloads/PayloadFunction.java (revision 1067678) +++ lucene/src/java/org/apache/lucene/search/payloads/PayloadFunction.java (working copy) @@ -16,7 +16,6 @@ * limitations under the License. */ -import java.io.Serializable; import org.apache.lucene.search.Explanation; /** @@ -29,7 +28,7 @@ * change * **/ -public abstract class PayloadFunction implements Serializable { +public abstract class PayloadFunction { /** * Calculate the score up to this point for this doc and field Index: lucene/src/java/org/apache/lucene/search/CachingWrapperFilter.java =================================================================== --- lucene/src/java/org/apache/lucene/search/CachingWrapperFilter.java (revision 1067678) +++ lucene/src/java/org/apache/lucene/search/CachingWrapperFilter.java (working copy) @@ -17,7 +17,6 @@ * limitations under the License. */ -import java.io.Serializable; import java.io.IOException; import java.util.Map; import java.util.WeakHashMap; @@ -68,7 +67,7 @@ protected final FilterCache cache; - static abstract class FilterCache implements Serializable { + static abstract class FilterCache { /** * A transient Filter cache (package private because of test) Index: lucene/src/java/org/apache/lucene/search/function/ValueSource.java =================================================================== --- lucene/src/java/org/apache/lucene/search/function/ValueSource.java (revision 1067678) +++ lucene/src/java/org/apache/lucene/search/function/ValueSource.java (working copy) @@ -23,7 +23,6 @@ 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 @@ * * */ -public abstract class ValueSource implements Serializable { +public abstract class ValueSource { /** * Return the DocValues used by the function query. Index: lucene/src/java/org/apache/lucene/search/Query.java =================================================================== --- lucene/src/java/org/apache/lucene/search/Query.java (revision 1067678) +++ lucene/src/java/org/apache/lucene/search/Query.java (working copy) @@ -44,7 +44,7 @@
  • {@link org.apache.lucene.queryParser.QueryParser QueryParser} */ -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 b. Documents Index: lucene/src/java/org/apache/lucene/search/TopDocs.java =================================================================== --- lucene/src/java/org/apache/lucene/search/TopDocs.java (revision 1067678) +++ lucene/src/java/org/apache/lucene/search/TopDocs.java (working copy) @@ -20,7 +20,7 @@ /** 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; Index: lucene/src/java/org/apache/lucene/search/Explanation.java =================================================================== --- lucene/src/java/org/apache/lucene/search/Explanation.java (revision 1067678) +++ lucene/src/java/org/apache/lucene/search/Explanation.java (working copy) @@ -17,11 +17,10 @@ * 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 details; // sub-explanations @@ -135,7 +134,7 @@ * before storing any large or un-serializable fields. * */ - public static abstract class IDFExplanation implements Serializable { + public static abstract class IDFExplanation { /** * @return the idf factor */ Index: lucene/src/java/org/apache/lucene/search/Sort.java =================================================================== --- lucene/src/java/org/apache/lucene/search/Sort.java (revision 1067678) +++ lucene/src/java/org/apache/lucene/search/Sort.java (working copy) @@ -17,7 +17,6 @@ * limitations under the License. */ -import java.io.Serializable; import java.util.Arrays; @@ -97,8 +96,7 @@ * * @since lucene 1.4 */ -public class Sort -implements Serializable { +public class Sort { /** * Represents sorting by computed relevance. Using this sort criteria returns Index: lucene/src/java/org/apache/lucene/search/SortField.java =================================================================== --- lucene/src/java/org/apache/lucene/search/SortField.java (revision 1067678) +++ lucene/src/java/org/apache/lucene/search/SortField.java (working copy) @@ -18,7 +18,6 @@ */ import java.io.IOException; -import java.io.Serializable; import java.util.Locale; import org.apache.lucene.search.cache.*; @@ -33,8 +32,7 @@ * @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 @@ 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. * Index: lucene/src/java/org/apache/lucene/search/ScoreDoc.java =================================================================== --- lucene/src/java/org/apache/lucene/search/ScoreDoc.java (revision 1067678) +++ lucene/src/java/org/apache/lucene/search/ScoreDoc.java (working copy) @@ -19,7 +19,7 @@ /** 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; Index: lucene/src/java/org/apache/lucene/search/BooleanClause.java =================================================================== --- lucene/src/java/org/apache/lucene/search/BooleanClause.java (revision 1067678) +++ lucene/src/java/org/apache/lucene/search/BooleanClause.java (working copy) @@ -18,7 +18,7 @@ */ /** 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 { Index: lucene/src/java/org/apache/lucene/search/Weight.java =================================================================== --- lucene/src/java/org/apache/lucene/search/Weight.java (revision 1067678) +++ lucene/src/java/org/apache/lucene/search/Weight.java (working copy) @@ -18,7 +18,6 @@ */ 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 @@ * * @since 2.9 */ -public abstract class Weight implements Serializable { +public abstract class Weight { /** * An explanation of the score computation for the named document. Index: lucene/src/java/org/apache/lucene/search/FieldComparatorSource.java =================================================================== --- lucene/src/java/org/apache/lucene/search/FieldComparatorSource.java (revision 1067678) +++ lucene/src/java/org/apache/lucene/search/FieldComparatorSource.java (working copy) @@ -18,7 +18,6 @@ */ import java.io.IOException; -import java.io.Serializable; /** * Provides a {@link FieldComparator} for custom field sorting. @@ -26,7 +25,7 @@ * @lucene.experimental * */ -public abstract class FieldComparatorSource implements Serializable { +public abstract class FieldComparatorSource { /** * Creates a comparator for the field in the given index. Index: lucene/src/java/org/apache/lucene/index/Payload.java =================================================================== --- lucene/src/java/org/apache/lucene/index/Payload.java (revision 1067678) +++ lucene/src/java/org/apache/lucene/index/Payload.java (working copy) @@ -17,8 +17,6 @@ * limitations under the License. */ -import java.io.Serializable; - import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.util.ArrayUtil; @@ -34,7 +32,7 @@ * to retrieve the payloads from the index.
    * */ -public class Payload implements Serializable, Cloneable { +public class Payload implements Cloneable { /** the byte array containing the payload data */ protected byte[] data; Index: lucene/src/java/org/apache/lucene/index/Term.java =================================================================== --- lucene/src/java/org/apache/lucene/index/Term.java (revision 1067678) +++ lucene/src/java/org/apache/lucene/index/Term.java (working copy) @@ -30,7 +30,7 @@ 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, java.io.Serializable { +public final class Term implements Comparable { String field; BytesRef bytes; @@ -199,11 +199,4 @@ @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); - } } Index: lucene/src/java/org/apache/lucene/index/TermVectorOffsetInfo.java =================================================================== --- lucene/src/java/org/apache/lucene/index/TermVectorOffsetInfo.java (revision 1067678) +++ lucene/src/java/org/apache/lucene/index/TermVectorOffsetInfo.java (working copy) @@ -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 @@ * 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. */ Index: lucene/src/java/org/apache/lucene/messages/Message.java =================================================================== --- lucene/src/java/org/apache/lucene/messages/Message.java (revision 1067678) +++ lucene/src/java/org/apache/lucene/messages/Message.java (working copy) @@ -17,14 +17,13 @@ * 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(); Index: lucene/src/java/org/apache/lucene/messages/MessageImpl.java =================================================================== --- lucene/src/java/org/apache/lucene/messages/MessageImpl.java (revision 1067678) +++ lucene/src/java/org/apache/lucene/messages/MessageImpl.java (working copy) @@ -25,8 +25,6 @@ */ public class MessageImpl implements Message { - private static final long serialVersionUID = -3077643314630884523L; - private String key; private Object[] arguments = new Object[0]; Index: lucene/src/java/org/apache/lucene/store/RAMFile.java =================================================================== --- lucene/src/java/org/apache/lucene/store/RAMFile.java (revision 1067678) +++ lucene/src/java/org/apache/lucene/store/RAMFile.java (working copy) @@ -18,13 +18,9 @@ */ 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 buffers = new ArrayList(); long length; RAMDirectory directory; Index: lucene/src/java/org/apache/lucene/store/RAMDirectory.java =================================================================== --- lucene/src/java/org/apache/lucene/store/RAMDirectory.java (revision 1067678) +++ lucene/src/java/org/apache/lucene/store/RAMDirectory.java (working copy) @@ -19,7 +19,6 @@ 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 @@ * 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 fileMap = new ConcurrentHashMap(); protected final AtomicLong sizeInBytes = new AtomicLong(); Index: lucene/src/java/org/apache/lucene/util/MapBackedSet.java =================================================================== --- lucene/src/java/org/apache/lucene/util/MapBackedSet.java (revision 1067678) +++ lucene/src/java/org/apache/lucene/util/MapBackedSet.java (working copy) @@ -17,7 +17,6 @@ * limitations under the License. */ -import java.io.Serializable; import java.util.AbstractSet; import java.util.Iterator; import java.util.Map; @@ -28,10 +27,7 @@ * * @lucene.internal */ -public final class MapBackedSet extends AbstractSet implements Serializable { - - private static final long serialVersionUID = -6761513279741915432L; - +public final class MapBackedSet extends AbstractSet { private final Map map; /** Index: lucene/src/java/org/apache/lucene/util/automaton/Automaton.java =================================================================== --- lucene/src/java/org/apache/lucene/util/automaton/Automaton.java (revision 1067678) +++ lucene/src/java/org/apache/lucene/util/automaton/Automaton.java (working copy) @@ -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; @@ -68,7 +67,7 @@ *

    * @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 Index: lucene/src/java/org/apache/lucene/util/automaton/State.java =================================================================== --- lucene/src/java/org/apache/lucene/util/automaton/State.java (revision 1067678) +++ lucene/src/java/org/apache/lucene/util/automaton/State.java (working copy) @@ -31,7 +31,6 @@ 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 @@ * * @lucene.experimental */ -public class State implements Serializable, Comparable { +public class State implements Comparable { boolean accept; public Transition[] transitionsArray; Index: lucene/src/java/org/apache/lucene/util/automaton/Transition.java =================================================================== --- lucene/src/java/org/apache/lucene/util/automaton/Transition.java (revision 1067678) +++ lucene/src/java/org/apache/lucene/util/automaton/Transition.java (working copy) @@ -29,7 +29,6 @@ package org.apache.lucene.util.automaton; -import java.io.Serializable; import java.util.Comparator; /** @@ -40,7 +39,7 @@ * * @lucene.experimental */ -public class Transition implements Serializable, Cloneable { +public class Transition implements Cloneable { /* * CLASS INVARIANT: min<=max Index: lucene/src/java/org/apache/lucene/util/automaton/RunAutomaton.java =================================================================== --- lucene/src/java/org/apache/lucene/util/automaton/RunAutomaton.java (revision 1067678) +++ lucene/src/java/org/apache/lucene/util/automaton/RunAutomaton.java (working copy) @@ -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; Index: lucene/src/java/org/apache/lucene/util/OpenBitSet.java =================================================================== --- lucene/src/java/org/apache/lucene/util/OpenBitSet.java (revision 1067678) +++ lucene/src/java/org/apache/lucene/util/OpenBitSet.java (working copy) @@ -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 @@ */ -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 Index: lucene/src/java/org/apache/lucene/util/BytesRef.java =================================================================== --- lucene/src/java/org/apache/lucene/util/BytesRef.java (revision 1067678) +++ lucene/src/java/org/apache/lucene/util/BytesRef.java (working copy) @@ -21,14 +21,13 @@ 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, Externalizable { +public final class BytesRef implements Comparable { static final int HASH_PRIME = 31; public static final byte[] EMPTY_BYTES = new byte[0]; @@ -365,25 +364,4 @@ 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; - } - } } Index: lucene/src/java/org/apache/lucene/util/AttributeImpl.java =================================================================== --- lucene/src/java/org/apache/lucene/util/AttributeImpl.java (revision 1067678) +++ lucene/src/java/org/apache/lucene/util/AttributeImpl.java (working copy) @@ -17,7 +17,6 @@ * 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 @@ * 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 Index: lucene/src/java/org/apache/lucene/document/Field.java =================================================================== --- lucene/src/java/org/apache/lucene/document/Field.java (revision 1067678) +++ lucene/src/java/org/apache/lucene/document/Field.java (working copy) @@ -18,7 +18,6 @@ */ import java.io.Reader; -import java.io.Serializable; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.index.IndexWriter; @@ -32,7 +31,7 @@ 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 { Index: lucene/src/java/org/apache/lucene/document/FieldSelector.java =================================================================== --- lucene/src/java/org/apache/lucene/document/FieldSelector.java (revision 1067678) +++ lucene/src/java/org/apache/lucene/document/FieldSelector.java (working copy) @@ -1,6 +1,5 @@ package org.apache.lucene.document; -import java.io.Serializable; /** * Copyright 2004 The Apache Software Foundation * @@ -22,7 +21,7 @@ * 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 { /** * Index: lucene/src/java/org/apache/lucene/document/Fieldable.java =================================================================== --- lucene/src/java/org/apache/lucene/document/Fieldable.java (revision 1067678) +++ lucene/src/java/org/apache/lucene/document/Fieldable.java (working copy) @@ -22,7 +22,6 @@ 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 @@ *

    * **/ -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. Index: lucene/src/java/org/apache/lucene/document/Document.java =================================================================== --- lucene/src/java/org/apache/lucene/document/Document.java (revision 1067678) +++ lucene/src/java/org/apache/lucene/document/Document.java (working copy) @@ -35,7 +35,7 @@ * ScoreDoc#doc} or {@link IndexReader#document(int)}. */ -public final class Document implements java.io.Serializable { +public final class Document { List fields = new ArrayList(); private float boost = 1.0f; Index: lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/spans/UniqueFieldAttributeImpl.java =================================================================== --- lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/spans/UniqueFieldAttributeImpl.java (revision 1067678) +++ lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/spans/UniqueFieldAttributeImpl.java (working copy) @@ -31,8 +31,6 @@ public class UniqueFieldAttributeImpl extends AttributeImpl implements UniqueFieldAttribute { - private static final long serialVersionUID = 8553318595851064232L; - private CharSequence uniqueField; public UniqueFieldAttributeImpl() { Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/RangeCollatorAttributeImpl.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/RangeCollatorAttributeImpl.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/RangeCollatorAttributeImpl.java (working copy) @@ -35,8 +35,6 @@ public class RangeCollatorAttributeImpl extends AttributeImpl implements RangeCollatorAttribute { - private static final long serialVersionUID = -6804360312723049526L; - private Collator rangeCollator; public RangeCollatorAttributeImpl() { Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/MultiFieldAttributeImpl.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/MultiFieldAttributeImpl.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/MultiFieldAttributeImpl.java (working copy) @@ -33,8 +33,6 @@ public class MultiFieldAttributeImpl extends AttributeImpl implements MultiFieldAttribute { - private static final long serialVersionUID = -6809760312720049526L; - private CharSequence[] fields; public MultiFieldAttributeImpl() { Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/DefaultOperatorAttributeImpl.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/DefaultOperatorAttributeImpl.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/DefaultOperatorAttributeImpl.java (working copy) @@ -32,8 +32,6 @@ public class DefaultOperatorAttributeImpl extends AttributeImpl implements DefaultOperatorAttribute { - private static final long serialVersionUID = -6804760312723049526L; - private Operator operator = Operator.OR; public DefaultOperatorAttributeImpl() { Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/LowercaseExpandedTermsAttributeImpl.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/LowercaseExpandedTermsAttributeImpl.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/LowercaseExpandedTermsAttributeImpl.java (working copy) @@ -33,8 +33,6 @@ public class LowercaseExpandedTermsAttributeImpl extends AttributeImpl implements LowercaseExpandedTermsAttribute { - private static final long serialVersionUID = -2804760312723049527L; - private boolean lowercaseExpandedTerms = true; public LowercaseExpandedTermsAttributeImpl() { Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/FieldDateResolutionFCListener.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/FieldDateResolutionFCListener.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/FieldDateResolutionFCListener.java (working copy) @@ -36,8 +36,6 @@ */ public class FieldDateResolutionFCListener implements FieldConfigListener { - private static final long serialVersionUID = -5929802948798314067L; - private QueryConfigHandler config = null; public FieldDateResolutionFCListener(QueryConfigHandler config) { Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/DefaultPhraseSlopAttributeImpl.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/DefaultPhraseSlopAttributeImpl.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/DefaultPhraseSlopAttributeImpl.java (working copy) @@ -32,8 +32,6 @@ public class DefaultPhraseSlopAttributeImpl extends AttributeImpl implements DefaultPhraseSlopAttribute { - private static final long serialVersionUID = -2104763012527049527L; - private int defaultPhraseSlop = 0; public DefaultPhraseSlopAttributeImpl() { Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/FieldBoostMapAttributeImpl.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/FieldBoostMapAttributeImpl.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/FieldBoostMapAttributeImpl.java (working copy) @@ -36,8 +36,6 @@ public class FieldBoostMapAttributeImpl extends AttributeImpl implements FieldBoostMapAttribute { - private static final long serialVersionUID = -2104763012523049527L; - private Map boosts = new LinkedHashMap(); Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/PositionIncrementsAttributeImpl.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/PositionIncrementsAttributeImpl.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/PositionIncrementsAttributeImpl.java (working copy) @@ -31,8 +31,6 @@ public class PositionIncrementsAttributeImpl extends AttributeImpl implements PositionIncrementsAttribute { - private static final long serialVersionUID = -2804763012793049527L; - private boolean positionIncrementsEnabled = false; public PositionIncrementsAttributeImpl() { Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/LocaleAttributeImpl.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/LocaleAttributeImpl.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/LocaleAttributeImpl.java (working copy) @@ -33,8 +33,6 @@ public class LocaleAttributeImpl extends AttributeImpl implements LocaleAttribute { - private static final long serialVersionUID = -6804760312720049526L; - private Locale locale = Locale.getDefault(); public LocaleAttributeImpl() { Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/FieldBoostMapFCListener.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/FieldBoostMapFCListener.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/FieldBoostMapFCListener.java (working copy) @@ -34,8 +34,6 @@ */ public class FieldBoostMapFCListener implements FieldConfigListener { - private static final long serialVersionUID = -5929802948798314067L; - private QueryConfigHandler config = null; public FieldBoostMapFCListener(QueryConfigHandler config) { Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/DateResolutionAttributeImpl.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/DateResolutionAttributeImpl.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/DateResolutionAttributeImpl.java (working copy) @@ -33,8 +33,6 @@ public class DateResolutionAttributeImpl extends AttributeImpl implements DateResolutionAttribute { - private static final long serialVersionUID = -6804360312723049526L; - private DateTools.Resolution dateResolution = null; public DateResolutionAttributeImpl() { Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/FieldDateResolutionMapAttributeImpl.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/FieldDateResolutionMapAttributeImpl.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/FieldDateResolutionMapAttributeImpl.java (working copy) @@ -33,8 +33,6 @@ public class FieldDateResolutionMapAttributeImpl extends AttributeImpl implements FieldDateResolutionMapAttribute { - private static final long serialVersionUID = -2104763012523049527L; - private Map dateRes = new HashMap(); Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/AllowLeadingWildcardAttributeImpl.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/AllowLeadingWildcardAttributeImpl.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/AllowLeadingWildcardAttributeImpl.java (working copy) @@ -31,8 +31,6 @@ public class AllowLeadingWildcardAttributeImpl extends AttributeImpl implements AllowLeadingWildcardAttribute { - private static final long serialVersionUID = -2804763012723049527L; - private boolean allowLeadingWildcard = false; // default in 2.9 public void setAllowLeadingWildcard(boolean allowLeadingWildcard) { Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/AnalyzerAttributeImpl.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/AnalyzerAttributeImpl.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/AnalyzerAttributeImpl.java (working copy) @@ -33,8 +33,6 @@ public class AnalyzerAttributeImpl extends AttributeImpl implements AnalyzerAttribute { - private static final long serialVersionUID = -6804760312723049526L; - private Analyzer analyzer; public AnalyzerAttributeImpl() { Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/MultiTermRewriteMethodAttributeImpl.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/MultiTermRewriteMethodAttributeImpl.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/MultiTermRewriteMethodAttributeImpl.java (working copy) @@ -33,8 +33,6 @@ */ public class MultiTermRewriteMethodAttributeImpl extends AttributeImpl implements MultiTermRewriteMethodAttribute { - - private static final long serialVersionUID = -2104763012723049527L; private MultiTermQuery.RewriteMethod multiTermRewriteMethod = MultiTermQuery.CONSTANT_SCORE_AUTO_REWRITE_DEFAULT; Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/BoostAttributeImpl.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/BoostAttributeImpl.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/BoostAttributeImpl.java (working copy) @@ -33,8 +33,6 @@ public class BoostAttributeImpl extends AttributeImpl implements BoostAttribute { - private static final long serialVersionUID = -2104763012523049527L; - private float boost = 1.0f; public BoostAttributeImpl() { Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/FuzzyAttributeImpl.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/FuzzyAttributeImpl.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/FuzzyAttributeImpl.java (working copy) @@ -33,8 +33,6 @@ public class FuzzyAttributeImpl extends AttributeImpl implements FuzzyAttribute { - private static final long serialVersionUID = -2104763012527049527L; - private int prefixLength = FuzzyQuery.defaultPrefixLength; private float minSimilarity = FuzzyQuery.defaultMinSimilarity; Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/PrefixWildcardQueryNode.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/PrefixWildcardQueryNode.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/PrefixWildcardQueryNode.java (working copy) @@ -27,8 +27,6 @@ */ public class PrefixWildcardQueryNode extends WildcardQueryNode { - private static final long serialVersionUID = 6851557641826407515L; - /** * @param field * - field name Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/BooleanModifierNode.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/BooleanModifierNode.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/BooleanModifierNode.java (working copy) @@ -30,8 +30,6 @@ */ public class BooleanModifierNode extends ModifierQueryNode { - private static final long serialVersionUID = -557816496416587068L; - public BooleanModifierNode(QueryNode node, Modifier mod) { super(node, mod); } Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/WildcardQueryNode.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/WildcardQueryNode.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/WildcardQueryNode.java (working copy) @@ -25,7 +25,6 @@ * phrases. Examples: a*b*c Fl?w? m?ke*g */ public class WildcardQueryNode extends FieldQueryNode { - private static final long serialVersionUID = 0L; /** * @param field Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/RegexpQueryNode.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/RegexpQueryNode.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/RegexpQueryNode.java (working copy) @@ -29,7 +29,6 @@ */ public class RegexpQueryNode extends QueryNodeImpl implements TextableQueryNode, FieldableNode { - private static final long serialVersionUID = 0L; private CharSequence text; private CharSequence field; /** Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/RangeQueryNode.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/RangeQueryNode.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/RangeQueryNode.java (working copy) @@ -34,8 +34,6 @@ */ public class RangeQueryNode extends ParametricRangeQueryNode { - private static final long serialVersionUID = 7400866652044314657L; - private Collator collator; /** Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/MultiPhraseQueryNode.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/MultiPhraseQueryNode.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/MultiPhraseQueryNode.java (working copy) @@ -33,8 +33,6 @@ public class MultiPhraseQueryNode extends QueryNodeImpl implements FieldableNode { - private static final long serialVersionUID = -2138501723963320158L; - public MultiPhraseQueryNode() { setLeaf(false); allocate(); Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/StandardBooleanQueryNode.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/StandardBooleanQueryNode.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/StandardBooleanQueryNode.java (working copy) @@ -34,8 +34,6 @@ */ public class StandardBooleanQueryNode extends BooleanQueryNode { - private static final long serialVersionUID = 1938287817191138787L; - private boolean disableCoord; /** Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/processors/QueryNodeProcessorImpl.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/processors/QueryNodeProcessorImpl.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/processors/QueryNodeProcessorImpl.java (working copy) @@ -244,8 +244,6 @@ private static class ChildrenList extends ArrayList { - private static final long serialVersionUID = -2613518456949297135L; - boolean beingUsed; } Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/QueryNodeError.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/QueryNodeError.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/QueryNodeError.java (working copy) @@ -27,8 +27,6 @@ * @see org.apache.lucene.messages.Message */ public class QueryNodeError extends Error implements NLSException { - - private static final long serialVersionUID = 1804855832182710327L; private Message message; /** Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/QueryNodeParseException.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/QueryNodeParseException.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/QueryNodeParseException.java (working copy) @@ -33,8 +33,6 @@ */ public class QueryNodeParseException extends QueryNodeException { - private static final long serialVersionUID = 8197535103538766773L; - private CharSequence query; private int beginColumn = -1; Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/ProximityQueryNode.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/ProximityQueryNode.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/ProximityQueryNode.java (working copy) @@ -33,8 +33,6 @@ */ public class ProximityQueryNode extends BooleanQueryNode { - private static final long serialVersionUID = 9018220596680832916L; - public enum Type { PARAGRAPH { @Override Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/ParametricRangeQueryNode.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/ParametricRangeQueryNode.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/ParametricRangeQueryNode.java (working copy) @@ -29,8 +29,6 @@ public class ParametricRangeQueryNode extends QueryNodeImpl implements FieldableNode { - private static final long serialVersionUID = 7120958816535573935L; - public ParametricRangeQueryNode(ParametricQueryNode lowerBound, ParametricQueryNode upperBound) { Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/QuotedFieldQueryNode.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/QuotedFieldQueryNode.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/QuotedFieldQueryNode.java (working copy) @@ -25,8 +25,6 @@ */ public class QuotedFieldQueryNode extends FieldQueryNode { - private static final long serialVersionUID = -6675157780051428987L; - /** * @param field * - field name Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/DeletedQueryNode.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/DeletedQueryNode.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/DeletedQueryNode.java (working copy) @@ -27,8 +27,6 @@ */ public class DeletedQueryNode extends QueryNodeImpl { - private static final long serialVersionUID = -9151675506000425293L; - public DeletedQueryNode() { // empty constructor } Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/NoTokenFoundQueryNode.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/NoTokenFoundQueryNode.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/NoTokenFoundQueryNode.java (working copy) @@ -25,8 +25,6 @@ */ public class NoTokenFoundQueryNode extends DeletedQueryNode { - private static final long serialVersionUID = 7332975497586993833L; - public NoTokenFoundQueryNode() { super(); } Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/SlopQueryNode.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/SlopQueryNode.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/SlopQueryNode.java (working copy) @@ -34,8 +34,6 @@ */ public class SlopQueryNode extends QueryNodeImpl implements FieldableNode { - private static final long serialVersionUID = 0L; - private int value = 0; /** Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/QueryNode.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/QueryNode.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/QueryNode.java (working copy) @@ -17,7 +17,6 @@ * limitations under the License. */ -import java.io.Serializable; import java.util.List; import java.util.Map; @@ -27,7 +26,7 @@ * A {@link QueryNode} is a interface implemented by all nodes on a QueryNode * tree. */ -public interface QueryNode extends Serializable { +public interface QueryNode { /** convert to a query string understood by the query parser */ // TODO: this interface might be changed in the future Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/BooleanQueryNode.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/BooleanQueryNode.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/BooleanQueryNode.java (working copy) @@ -28,8 +28,6 @@ */ public class BooleanQueryNode extends QueryNodeImpl { - private static final long serialVersionUID = -2206623652088638072L; - /** * @param clauses * - the query nodes to be and'ed Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/PhraseSlopQueryNode.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/PhraseSlopQueryNode.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/PhraseSlopQueryNode.java (working copy) @@ -26,8 +26,6 @@ public class PhraseSlopQueryNode extends QueryNodeImpl implements FieldableNode { - private static final long serialVersionUID = 0L; - private int value = 0; /** Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/OrQueryNode.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/OrQueryNode.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/OrQueryNode.java (working copy) @@ -29,8 +29,6 @@ */ public class OrQueryNode extends BooleanQueryNode { - private static final long serialVersionUID = -3692323307688017852L; - /** * @param clauses * - the query nodes to be or'ed Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/package.html =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/package.html (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/package.html (working copy) @@ -26,7 +26,7 @@

    Query Nodes

    The package org.apache.lucene.queryParser.nodes contains all the basic query nodes. The interface -that represents a query node is {@link org.apache.lucene.queryParser.core.nodes.QueryNode}. Every query node must be serializable. +that represents a query node is {@link org.apache.lucene.queryParser.core.nodes.QueryNode}.

    {@link org.apache.lucene.queryParser.core.nodes.QueryNode}s are used by the text parser to create a syntax tree. Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/FieldQueryNode.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/FieldQueryNode.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/FieldQueryNode.java (working copy) @@ -28,8 +28,6 @@ public class FieldQueryNode extends QueryNodeImpl implements TextableQueryNode, FieldableNode { - private static final long serialVersionUID = 3634521145130758265L; - /** * The term's field */ Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/BoostQueryNode.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/BoostQueryNode.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/BoostQueryNode.java (working copy) @@ -34,8 +34,6 @@ */ public class BoostQueryNode extends QueryNodeImpl { - private static final long serialVersionUID = -3929082630855807593L; - private float value = 0; /** Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/ParametricQueryNode.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/ParametricQueryNode.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/ParametricQueryNode.java (working copy) @@ -25,8 +25,6 @@ */ public class ParametricQueryNode extends FieldQueryNode { - private static final long serialVersionUID = -5770038129741218116L; - private CompareOperator operator; public enum CompareOperator { Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/FuzzyQueryNode.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/FuzzyQueryNode.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/FuzzyQueryNode.java (working copy) @@ -25,8 +25,6 @@ */ public class FuzzyQueryNode extends FieldQueryNode { - private static final long serialVersionUID = -1794537213032589441L; - private float similarity; private int prefixLength; Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/AnyQueryNode.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/AnyQueryNode.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/AnyQueryNode.java (working copy) @@ -26,8 +26,6 @@ * nodes. */ public class AnyQueryNode extends AndQueryNode { - private static final long serialVersionUID = 1000791433562954187L; - private CharSequence field = null; private int minimumMatchingmElements = 0; Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/OpaqueQueryNode.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/OpaqueQueryNode.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/OpaqueQueryNode.java (working copy) @@ -26,8 +26,6 @@ */ public class OpaqueQueryNode extends QueryNodeImpl { - private static final long serialVersionUID = 0L; - private CharSequence schema = null; private CharSequence value = null; Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/GroupQueryNode.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/GroupQueryNode.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/GroupQueryNode.java (working copy) @@ -34,8 +34,6 @@ */ public class GroupQueryNode extends QueryNodeImpl { - private static final long serialVersionUID = -9204673493869114999L; - /** * This QueryNode is used to identify parenthesis on the original query string */ Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/PathQueryNode.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/PathQueryNode.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/PathQueryNode.java (working copy) @@ -41,8 +41,6 @@ */ public class PathQueryNode extends QueryNodeImpl { - private static final long serialVersionUID = -8325921322405804789L; - public static class QueryText implements Cloneable { CharSequence value = null; /** Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/ModifierQueryNode.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/ModifierQueryNode.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/ModifierQueryNode.java (working copy) @@ -36,8 +36,6 @@ */ public class ModifierQueryNode extends QueryNodeImpl { - private static final long serialVersionUID = -391209837953928169L; - public enum Modifier { MOD_NONE, MOD_NOT, MOD_REQ; Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/MatchAllDocsQueryNode.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/MatchAllDocsQueryNode.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/MatchAllDocsQueryNode.java (working copy) @@ -25,8 +25,6 @@ */ public class MatchAllDocsQueryNode extends QueryNodeImpl { - private static final long serialVersionUID = -7050381275423477809L; - public MatchAllDocsQueryNode() { // empty constructor } Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/TokenizedPhraseQueryNode.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/TokenizedPhraseQueryNode.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/TokenizedPhraseQueryNode.java (working copy) @@ -28,8 +28,6 @@ public class TokenizedPhraseQueryNode extends QueryNodeImpl implements FieldableNode { - private static final long serialVersionUID = -7185108320787917541L; - public TokenizedPhraseQueryNode() { setLeaf(false); allocate(); Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/QueryNodeImpl.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/QueryNodeImpl.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/QueryNodeImpl.java (working copy) @@ -33,8 +33,6 @@ */ public abstract class QueryNodeImpl implements QueryNode, Cloneable { - private static final long serialVersionUID = 5569870883474845989L; - /* index default field */ // TODO remove PLAINTEXT_FIELD_NAME replacing it with configuration APIs public static final String PLAINTEXT_FIELD_NAME = "_plain"; Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/MatchNoDocsQueryNode.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/MatchNoDocsQueryNode.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/MatchNoDocsQueryNode.java (working copy) @@ -24,8 +24,6 @@ */ public class MatchNoDocsQueryNode extends DeletedQueryNode { - private static final long serialVersionUID = 8081805751679581497L; - public MatchNoDocsQueryNode() { // empty constructor } Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/AndQueryNode.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/AndQueryNode.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/AndQueryNode.java (working copy) @@ -27,8 +27,6 @@ */ public class AndQueryNode extends BooleanQueryNode { - private static final long serialVersionUID = 118496077529151825L; - /** * @param clauses * - the query nodes to be and'ed Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/QueryNodeException.java =================================================================== --- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/QueryNodeException.java (revision 1067678) +++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/QueryNodeException.java (working copy) @@ -42,8 +42,6 @@ */ public class QueryNodeException extends Exception implements NLSException { - private static final long serialVersionUID = -5962648855261624214L; - protected Message message = new MessageImpl(QueryParserMessages.EMPTY_MESSAGE); public QueryNodeException(Message message) { Index: lucene/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestSerialization.java =================================================================== --- lucene/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestSerialization.java (revision 1067678) +++ lucene/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestSerialization.java (working copy) @@ -1,56 +0,0 @@ -package org.apache.lucene.store.instantiated; - -/** - * Copyright 2006 The Apache Software Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -import org.apache.lucene.store.Directory; -import org.apache.lucene.util.LuceneTestCase; -import org.apache.lucene.index.IndexWriter; -import org.apache.lucene.index.IndexReader; -import org.apache.lucene.analysis.MockAnalyzer; -import org.apache.lucene.document.Document; -import org.apache.lucene.document.Field; - -import java.io.ByteArrayOutputStream; -import java.io.ObjectOutputStream; - -public class TestSerialization extends LuceneTestCase { - - public void test() throws Exception { - Directory dir = newDirectory(); - - IndexWriter iw = new IndexWriter(dir, newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer())); - Document doc = new Document(); - doc.add(new Field("foo", "bar rab abr bra rba", Field.Store.NO, Field.Index.ANALYZED, Field.TermVector.WITH_POSITIONS_OFFSETS)); - doc.add(new Field("moo", "bar rab abr bra rba", Field.Store.YES, Field.Index.ANALYZED, Field.TermVector.WITH_POSITIONS_OFFSETS)); - iw.addDocument(doc); - iw.close(); - - IndexReader ir = IndexReader.open(dir, false); - InstantiatedIndex ii = new InstantiatedIndex(ir); - ir.close(); - - ByteArrayOutputStream baos = new ByteArrayOutputStream(5000); - ObjectOutputStream oos = new ObjectOutputStream(baos); - oos.writeObject(ii); - oos.close(); - baos.close(); - dir.close(); - - } - -} Index: lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/FieldSettings.java =================================================================== --- lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/FieldSettings.java (revision 1067678) +++ lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/FieldSettings.java (working copy) @@ -3,7 +3,6 @@ import java.util.HashMap; import java.util.Map; import java.util.Collection; -import java.io.Serializable; /** * Licensed to the Apache Software Foundation (ASF) under one or more @@ -25,7 +24,7 @@ /** * Essentially a Map */ -class FieldSettings implements Serializable { +class FieldSettings { FieldSettings() { Index: lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedIndex.java =================================================================== --- lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedIndex.java (revision 1067678) +++ lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedIndex.java (working copy) @@ -18,7 +18,6 @@ import java.io.Closeable; import java.io.IOException; -import java.io.Serializable; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; @@ -60,10 +59,8 @@ * Consider using InstantiatedIndex as if it was immutable. */ public class InstantiatedIndex - implements Serializable,Closeable { + implements Closeable { - private static final long serialVersionUID = 1l; - private long version = System.currentTimeMillis(); private InstantiatedDocument[] documentsByNumber; Index: lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedTerm.java =================================================================== --- lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedTerm.java (revision 1067678) +++ lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedTerm.java (working copy) @@ -16,7 +16,6 @@ * limitations under the License. */ -import java.io.Serializable; import java.util.Comparator; import org.apache.lucene.index.Term; @@ -26,11 +25,8 @@ * * @see org.apache.lucene.index.Term */ -public class InstantiatedTerm - implements Serializable { +public class InstantiatedTerm { - private static final long serialVersionUID = 1l; - public static final Comparator comparator = new Comparator() { public int compare(InstantiatedTerm instantiatedTerm, InstantiatedTerm instantiatedTerm1) { return instantiatedTerm.getTerm().compareTo(instantiatedTerm1.getTerm()); Index: lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedTermFreqVector.java =================================================================== --- lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedTermFreqVector.java (revision 1067678) +++ lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedTermFreqVector.java (working copy) @@ -3,7 +3,6 @@ import org.apache.lucene.index.TermFreqVector; import org.apache.lucene.util.BytesRef; -import java.io.Serializable; import java.util.Arrays; import java.util.List; @@ -29,10 +28,8 @@ * @see org.apache.lucene.index.TermFreqVector */ public class InstantiatedTermFreqVector - implements TermFreqVector, Serializable { + implements TermFreqVector { - private static final long serialVersionUID = 1l; - private final List termDocumentInformations; private final String field; private final BytesRef terms[]; Index: lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/FieldSetting.java =================================================================== --- lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/FieldSetting.java (revision 1067678) +++ lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/FieldSetting.java (working copy) @@ -1,7 +1,5 @@ package org.apache.lucene.store.instantiated; -import java.io.Serializable; - /** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -22,7 +20,7 @@ /** * For non package access see {@link org.apache.lucene.index.IndexReader#getFieldNames(org.apache.lucene.index.IndexReader.FieldOption)} */ -class FieldSetting implements Serializable { +class FieldSetting { String fieldName; boolean storeTermVector = false; Index: lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedTermDocumentInformation.java =================================================================== --- lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedTermDocumentInformation.java (revision 1067678) +++ lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedTermDocumentInformation.java (working copy) @@ -2,7 +2,6 @@ import org.apache.lucene.index.TermVectorOffsetInfo; -import java.io.Serializable; import java.util.Comparator; /** @@ -38,11 +37,8 @@ * * */ -public class InstantiatedTermDocumentInformation - implements Serializable { +public class InstantiatedTermDocumentInformation { - private static final long serialVersionUID = 1l; - public static final Comparator termComparator = new Comparator() { public int compare(InstantiatedTermDocumentInformation instantiatedTermDocumentInformation, InstantiatedTermDocumentInformation instantiatedTermDocumentInformation1) { return instantiatedTermDocumentInformation.getTerm().getTerm().compareTo(instantiatedTermDocumentInformation1.getTerm().getTerm()); Index: lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedDocument.java =================================================================== --- lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedDocument.java (revision 1067678) +++ lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedDocument.java (working copy) @@ -18,7 +18,6 @@ import org.apache.lucene.document.Document; -import java.io.Serializable; import java.util.List; import java.util.Map; @@ -27,11 +26,8 @@ * * @see org.apache.lucene.document.Document */ -public class InstantiatedDocument - implements Serializable { +public class InstantiatedDocument { - private static final long serialVersionUID = 1l; - private Document document; public InstantiatedDocument() { Index: lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedTermPositionVector.java =================================================================== --- lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedTermPositionVector.java (revision 1067678) +++ lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedTermPositionVector.java (working copy) @@ -19,8 +19,6 @@ import org.apache.lucene.index.TermPositionVector; import org.apache.lucene.index.TermVectorOffsetInfo; -import java.io.Serializable; - /** * Extended vector space view of a document in an {@link InstantiatedIndexReader}. * @@ -28,10 +26,8 @@ */ public class InstantiatedTermPositionVector extends InstantiatedTermFreqVector - implements TermPositionVector, Serializable { + implements TermPositionVector { - private static final long serialVersionUID = 1l; - public InstantiatedTermPositionVector(InstantiatedDocument document, String field) { super(document, field); } Index: lucene/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/NumericRangeFilterBuilder.java =================================================================== --- lucene/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/NumericRangeFilterBuilder.java (revision 1067678) +++ lucene/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/NumericRangeFilterBuilder.java (working copy) @@ -154,7 +154,6 @@ } static class NoMatchFilter extends Filter { - private static final long serialVersionUID = 1L; @Override public DocIdSet getDocIdSet(AtomicReaderContext context) throws IOException { Index: lucene/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestCartesianShapeFilter.java =================================================================== --- lucene/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestCartesianShapeFilter.java (revision 1067678) +++ lucene/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestCartesianShapeFilter.java (working copy) @@ -1,45 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.lucene.spatial.tier; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.NotSerializableException; -import java.io.ObjectOutputStream; - -import org.apache.lucene.util.LuceneTestCase; - -/** - * - * Test for {@link CartesianShapeFilter} - * - */ -public class TestCartesianShapeFilter extends LuceneTestCase { - - public void testSerializable() throws IOException { - CartesianShapeFilter filter = new CartesianShapeFilter(new Shape("1"), - "test"); - try { - ByteArrayOutputStream bos = new ByteArrayOutputStream(); - ObjectOutputStream oos = new ObjectOutputStream(bos); - oos.writeObject(filter); - } catch (NotSerializableException e) { - fail("Filter should be serializable but raised a NotSerializableException ["+e.getMessage()+"]"); - } - } - -} Index: lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceFilter.java =================================================================== --- lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceFilter.java (revision 1067678) +++ lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceFilter.java (working copy) @@ -19,8 +19,6 @@ import java.util.Map; import java.util.WeakHashMap; import java.util.HashMap; -import java.io.IOException; -import java.io.ObjectInputStream; import org.apache.lucene.search.Filter; import org.apache.lucene.spatial.tier.DistanceHandler.Precision; @@ -63,12 +61,6 @@ distanceLookupCache = new WeakHashMap(); } - /** needed for deserialization, because the cache is transient */ - private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { - stream.defaultReadObject(); - distanceLookupCache = new WeakHashMap(); - } - public Map getDistances(){ return distances; } Index: lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/InvalidGeoException.java =================================================================== --- lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/InvalidGeoException.java (revision 1067678) +++ lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/InvalidGeoException.java (working copy) @@ -24,11 +24,6 @@ */ public class InvalidGeoException extends Exception { - /** - * - */ - private static final long serialVersionUID = 1L; - public InvalidGeoException(String message){ super(message); } Index: lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/Shape.java =================================================================== --- lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/Shape.java (revision 1067678) +++ lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/Shape.java (working copy) @@ -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 @@ * flux and might change in incompatible ways in the next * release. */ -public class Shape implements Serializable{ +public class Shape { private List area = new ArrayList(); private String tierId; Index: lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/LatLongDistanceFilter.java =================================================================== --- lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/LatLongDistanceFilter.java (revision 1067678) +++ lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/LatLongDistanceFilter.java (working copy) @@ -33,11 +33,6 @@ * release. */ public class LatLongDistanceFilter extends DistanceFilter { - - /** - * - */ - private static final long serialVersionUID = 1L; double lat; double lng; Index: lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceFieldComparatorSource.java =================================================================== --- lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceFieldComparatorSource.java (revision 1067678) +++ lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceFieldComparatorSource.java (working copy) @@ -31,8 +31,6 @@ */ public class DistanceFieldComparatorSource extends FieldComparatorSource { - private static final long serialVersionUID = 1L; - private DistanceFilter distanceFilter; private DistanceScoreDocLookupComparator dsdlc; Index: lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceQueryBuilder.java =================================================================== --- lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceQueryBuilder.java (revision 1067678) +++ lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceQueryBuilder.java (working copy) @@ -30,8 +30,6 @@ * release. */ public class DistanceQueryBuilder { - - private static final long serialVersionUID = 1L; private final double lat; private final double lng; Index: lucene/contrib/spatial/src/java/org/apache/lucene/spatial/geohash/GeoHashDistanceFilter.java =================================================================== --- lucene/contrib/spatial/src/java/org/apache/lucene/spatial/geohash/GeoHashDistanceFilter.java (revision 1067678) +++ lucene/contrib/spatial/src/java/org/apache/lucene/spatial/geohash/GeoHashDistanceFilter.java (working copy) @@ -36,11 +36,6 @@ */ public class GeoHashDistanceFilter extends DistanceFilter { - - /** - * - */ - private static final long serialVersionUID = 1L; private double lat; private double lng; Index: lucene/contrib/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java =================================================================== --- lucene/contrib/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java (revision 1067678) +++ lucene/contrib/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java (working copy) @@ -18,7 +18,6 @@ */ import java.io.IOException; -import java.io.Serializable; import java.io.StringReader; import java.util.Arrays; import java.util.Collection; @@ -186,7 +185,7 @@ * hprof tracing ). * */ -public class MemoryIndex implements Serializable { +public class MemoryIndex { /** info for each field: Map */ private final HashMap fields = new HashMap(); @@ -199,8 +198,6 @@ /** Could be made configurable; See {@link Document#setBoost(float)} */ private static final float docBoost = 1.0f; - - private static final long serialVersionUID = 2782195016849084649L; private static final boolean DEBUG = false; @@ -589,7 +586,7 @@ * Index data structure for a field; Contains the tokenized term texts and * their positions. */ - private static final class Info implements Serializable { + private static final class Info { /** * Term strings and their positions for this field: Map terms, int numTokens, int numOverlapTokens, float boost) { this.terms = terms; this.numTokens = numTokens; @@ -668,12 +663,10 @@ * Efficient resizable auto-expanding list holding int elements; * implemented with arrays. */ - private static final class ArrayIntList implements Serializable { + private static final class ArrayIntList { private int[] elements; private int size = 0; - - private static final long serialVersionUID = 2282195016849084649L; public ArrayIntList() { this(10); Index: lucene/contrib/queries/src/java/org/apache/lucene/search/FilterClause.java =================================================================== --- lucene/contrib/queries/src/java/org/apache/lucene/search/FilterClause.java (revision 1067678) +++ lucene/contrib/queries/src/java/org/apache/lucene/search/FilterClause.java (working copy) @@ -26,7 +26,7 @@ * of queries.) */ -public class FilterClause implements java.io.Serializable +public class FilterClause { Occur occur = null; Filter filter = null; Index: lucene/contrib/queries/src/java/org/apache/lucene/search/regex/RegexCapabilities.java =================================================================== --- lucene/contrib/queries/src/java/org/apache/lucene/search/regex/RegexCapabilities.java (revision 1067678) +++ lucene/contrib/queries/src/java/org/apache/lucene/search/regex/RegexCapabilities.java (working copy) @@ -1,7 +1,5 @@ package org.apache.lucene.search.regex; -import java.io.Serializable; - import org.apache.lucene.util.BytesRef; /** @@ -25,7 +23,7 @@ * Defines basic operations needed by {@link RegexQuery} for a regular * expression implementation. */ -public interface RegexCapabilities extends Serializable { +public interface RegexCapabilities { /** * Called by the constructor of {@link RegexTermsEnum} allowing * implementations to cache a compiled version of the regular