Skip to content

Apache Lucene open-source search software

LUCENE-2908: clean up serialization in the codebase

Robert Muir70a9910b381e
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index bdd4940c487..b41106f77b5 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -118,6 +118,10 @@ Changes in backwards compatibility policy
ParallelMultiSearcher into IndexSearcher as an optional
ExecutorServiced passed to its ctor. (Mike McCandless)
+* LUCENE-2908: Removed serialization code from lucene classes. It is recommended
+ that you serialize user search needs at a higher level in your application.
+ (Robert Muir)
+
* LUCENE-2831: Changed Weight#scorer, Weight#explain & Filter#getDocIdSet to
operate on a AtomicReaderContext instead of directly on IndexReader to enable
searches to be aware of IndexSearcher's context. (Simon Willnauer)
diff --git a/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/FieldSetting.java b/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/FieldSetting.java
index 50435f3ee05..bd2441b245c 100644
--- a/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/FieldSetting.java
+++ b/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/FieldSetting.java
@@ -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 @@ import java.io.Serializable;
/**
* 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;
diff --git a/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/FieldSettings.java b/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/FieldSettings.java
index 2eb9c72309a..4b0662c7323 100644
--- a/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/FieldSettings.java
+++ b/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/FieldSettings.java
@@ -3,7 +3,6 @@ package org.apache.lucene.store.instantiated;
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 @@ import java.io.Serializable;
/**
* Essentially a Map<FieldName, {@link org.apache.lucene.store.instantiated.FieldSetting}>
*/
-class FieldSettings implements Serializable {
+class FieldSettings {
FieldSettings() {
diff --git a/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedDocument.java b/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedDocument.java
index 5154f267e2b..889f749d47e 100644
--- a/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedDocument.java
+++ b/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedDocument.java
@@ -18,7 +18,6 @@ package org.apache.lucene.store.instantiated;
import org.apache.lucene.document.Document;
-import java.io.Serializable;
import java.util.List;
import java.util.Map;
@@ -27,10 +26,7 @@ import java.util.Map;
*
* @see org.apache.lucene.document.Document
*/
-public class InstantiatedDocument
- implements Serializable {
-
- private static final long serialVersionUID = 1l;
+public class InstantiatedDocument {
private Document document;
diff --git a/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedIndex.java b/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedIndex.java
index 76faa4602bd..b98f3cb337e 100644
--- a/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedIndex.java
+++ b/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedIndex.java
@@ -18,7 +18,6 @@ package org.apache.lucene.store.instantiated;
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,9 +59,7 @@ import org.apache.lucene.util.BytesRef;
* Consider using InstantiatedIndex as if it was immutable.
*/
public class InstantiatedIndex
- implements Serializable,Closeable {
-
- private static final long serialVersionUID = 1l;
+ implements Closeable {
private long version = System.currentTimeMillis();
diff --git a/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedTerm.java b/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedTerm.java
index cdd2197c89c..67e7f7805fa 100644
--- a/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedTerm.java
+++ b/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedTerm.java
@@ -16,7 +16,6 @@ package org.apache.lucene.store.instantiated;
* limitations under the License.
*/
-import java.io.Serializable;
import java.util.Comparator;
import org.apache.lucene.index.Term;
@@ -26,10 +25,7 @@ import org.apache.lucene.index.Term;
*
* @see org.apache.lucene.index.Term
*/
-public class InstantiatedTerm
- implements Serializable {
-
- private static final long serialVersionUID = 1l;
+public class InstantiatedTerm {
public static final Comparator<InstantiatedTerm> comparator = new Comparator<InstantiatedTerm>() {
public int compare(InstantiatedTerm instantiatedTerm, InstantiatedTerm instantiatedTerm1) {
diff --git a/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedTermDocumentInformation.java b/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedTermDocumentInformation.java
index 843eb08e140..c8d9138ac6a 100644
--- a/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedTermDocumentInformation.java
+++ b/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedTermDocumentInformation.java
@@ -2,7 +2,6 @@ package org.apache.lucene.store.instantiated;
import org.apache.lucene.index.TermVectorOffsetInfo;
-import java.io.Serializable;
import java.util.Comparator;
/**
@@ -38,10 +37,7 @@ import java.util.Comparator;
* </pre>
*
*/
-public class InstantiatedTermDocumentInformation
- implements Serializable {
-
- private static final long serialVersionUID = 1l;
+public class InstantiatedTermDocumentInformation {
public static final Comparator<InstantiatedTermDocumentInformation> termComparator = new Comparator<InstantiatedTermDocumentInformation>() {
public int compare(InstantiatedTermDocumentInformation instantiatedTermDocumentInformation, InstantiatedTermDocumentInformation instantiatedTermDocumentInformation1) {
diff --git a/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedTermFreqVector.java b/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedTermFreqVector.java
index e688b6fe6e7..dcbc49185d9 100644
--- a/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedTermFreqVector.java
+++ b/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedTermFreqVector.java
@@ -3,7 +3,6 @@ package org.apache.lucene.store.instantiated;
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,9 +28,7 @@ import java.util.List;
* @see org.apache.lucene.index.TermFreqVector
*/
public class InstantiatedTermFreqVector
- implements TermFreqVector, Serializable {
-
- private static final long serialVersionUID = 1l;
+ implements TermFreqVector {
private final List<InstantiatedTermDocumentInformation> termDocumentInformations;
private final String field;
diff --git a/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedTermPositionVector.java b/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedTermPositionVector.java
index 56d8e02a2ed..8d40063ed25 100644
--- a/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedTermPositionVector.java
+++ b/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedTermPositionVector.java
@@ -19,8 +19,6 @@ package org.apache.lucene.store.instantiated;
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,9 +26,7 @@ import java.io.Serializable;
*/
public class InstantiatedTermPositionVector
extends InstantiatedTermFreqVector
- implements TermPositionVector, Serializable {
-
- private static final long serialVersionUID = 1l;
+ implements TermPositionVector {
public InstantiatedTermPositionVector(InstantiatedDocument document, String field) {
super(document, field);
diff --git a/lucene/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestSerialization.java b/lucene/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestSerialization.java
deleted file mode 100644
index 49dc1604157..00000000000
--- a/lucene/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestSerialization.java
+++ /dev/null
@@ -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();
-
- }
-
-}
diff --git a/lucene/contrib/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java b/lucene/contrib/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java
index 437d313b9c9..4ffac05bcf4 100644
--- a/lucene/contrib/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java
+++ b/lucene/contrib/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java
@@ -18,7 +18,6 @@ package org.apache.lucene.index.memory;
*/
import java.io.IOException;
-import java.io.Serializable;
import java.io.StringReader;
import java.util.Arrays;
import java.util.Collection;
@@ -186,7 +185,7 @@ import org.apache.lucene.util.Constants; // for javadocs
* hprof tracing </a>).
*
*/
-public class MemoryIndex implements Serializable {
+public class MemoryIndex {
/** info for each field: Map<String fieldName, Info field> */
private final HashMap<String,Info> fields = new HashMap<String,Info>();
@@ -199,8 +198,6 @@ public class MemoryIndex implements Serializable {
/** 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 @@ public class MemoryIndex implements Serializable {
* 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 <String
@@ -614,8 +611,6 @@ public class MemoryIndex implements Serializable {
private final long sumTotalTermFreq;
- private static final long serialVersionUID = 2882195016849084649L;
-
public Info(HashMap<BytesRef,ArrayIntList> terms, int numTokens, int numOverlapTokens, float boost) {
this.terms = terms;
this.numTokens = numTokens;
@@ -668,12 +663,10 @@ public class MemoryIndex implements Serializable {
* Efficient resizable auto-expanding list holding <code>int</code> 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);
diff --git a/lucene/contrib/queries/src/java/org/apache/lucene/search/FilterClause.java b/lucene/contrib/queries/src/java/org/apache/lucene/search/FilterClause.java
index d816066a31b..26937ab6e0b 100644
--- a/lucene/contrib/queries/src/java/org/apache/lucene/search/FilterClause.java
+++ b/lucene/contrib/queries/src/java/org/apache/lucene/search/FilterClause.java
@@ -26,7 +26,7 @@ import org.apache.lucene.search.BooleanClause.Occur;
* of queries.)
*/
-public class FilterClause implements java.io.Serializable
+public class FilterClause
{
Occur occur = null;
Filter filter = null;
diff --git a/lucene/contrib/queries/src/java/org/apache/lucene/search/regex/RegexCapabilities.java b/lucene/contrib/queries/src/java/org/apache/lucene/search/regex/RegexCapabilities.java
index e8c6daed713..c14053c0db3 100644
--- a/lucene/contrib/queries/src/java/org/apache/lucene/search/regex/RegexCapabilities.java
+++ b/lucene/contrib/queries/src/java/org/apache/lucene/search/regex/RegexCapabilities.java
@@ -1,7 +1,5 @@
package org.apache.lucene.search.regex;
-import java.io.Serializable;
-
import org.apache.lucene.util.BytesRef;
/**
@@ -25,7 +23,7 @@ import org.apache.lucene.util.BytesRef;
* 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
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/QueryNodeError.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/QueryNodeError.java
index 95b25722d1f..cb3e77e25c6 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/QueryNodeError.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/QueryNodeError.java
@@ -27,8 +27,6 @@ import org.apache.lucene.messages.NLSException;
* @see org.apache.lucene.messages.Message
*/
public class QueryNodeError extends Error implements NLSException {
-
- private static final long serialVersionUID = 1804855832182710327L;
private Message message;
/**
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/QueryNodeException.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/QueryNodeException.java
index 9a7223b6d3f..22db1d5b37a 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/QueryNodeException.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/QueryNodeException.java
@@ -42,8 +42,6 @@ import org.apache.lucene.queryParser.core.nodes.QueryNode;
*/
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) {
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/QueryNodeParseException.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/QueryNodeParseException.java
index c60f657b140..a628574eaf4 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/QueryNodeParseException.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/QueryNodeParseException.java
@@ -33,8 +33,6 @@ import org.apache.lucene.queryParser.core.parser.SyntaxParser;
*/
public class QueryNodeParseException extends QueryNodeException {
- private static final long serialVersionUID = 8197535103538766773L;
-
private CharSequence query;
private int beginColumn = -1;
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/AndQueryNode.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/AndQueryNode.java
index 5cdd2f752b1..421be88ee33 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/AndQueryNode.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/AndQueryNode.java
@@ -27,8 +27,6 @@ import org.apache.lucene.queryParser.core.parser.EscapeQuerySyntax;
*/
public class AndQueryNode extends BooleanQueryNode {
- private static final long serialVersionUID = 118496077529151825L;
-
/**
* @param clauses
* - the query nodes to be and'ed
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/AnyQueryNode.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/AnyQueryNode.java
index 80818d8888f..cd6d7e25395 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/AnyQueryNode.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/AnyQueryNode.java
@@ -26,8 +26,6 @@ import org.apache.lucene.queryParser.core.parser.EscapeQuerySyntax;
* nodes.
*/
public class AnyQueryNode extends AndQueryNode {
- private static final long serialVersionUID = 1000791433562954187L;
-
private CharSequence field = null;
private int minimumMatchingmElements = 0;
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/BooleanQueryNode.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/BooleanQueryNode.java
index 8a1832566fe..56cd2203cda 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/BooleanQueryNode.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/BooleanQueryNode.java
@@ -28,8 +28,6 @@ import org.apache.lucene.queryParser.core.parser.EscapeQuerySyntax;
*/
public class BooleanQueryNode extends QueryNodeImpl {
- private static final long serialVersionUID = -2206623652088638072L;
-
/**
* @param clauses
* - the query nodes to be and'ed
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/BoostQueryNode.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/BoostQueryNode.java
index b337be4cb8d..cd8620d782b 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/BoostQueryNode.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/BoostQueryNode.java
@@ -34,8 +34,6 @@ import org.apache.lucene.queryParser.core.parser.EscapeQuerySyntax;
*/
public class BoostQueryNode extends QueryNodeImpl {
- private static final long serialVersionUID = -3929082630855807593L;
-
private float value = 0;
/**
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/DeletedQueryNode.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/DeletedQueryNode.java
index daa7d69ae74..cb859f65c7e 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/DeletedQueryNode.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/DeletedQueryNode.java
@@ -27,8 +27,6 @@ import org.apache.lucene.queryParser.core.processors.RemoveDeletedQueryNodesProc
*/
public class DeletedQueryNode extends QueryNodeImpl {
- private static final long serialVersionUID = -9151675506000425293L;
-
public DeletedQueryNode() {
// empty constructor
}
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/FieldQueryNode.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/FieldQueryNode.java
index f39016c37e6..33614977285 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/FieldQueryNode.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/FieldQueryNode.java
@@ -28,8 +28,6 @@ import org.apache.lucene.queryParser.core.parser.EscapeQuerySyntax.Type;
public class FieldQueryNode extends QueryNodeImpl implements TextableQueryNode,
FieldableNode {
- private static final long serialVersionUID = 3634521145130758265L;
-
/**
* The term's field
*/
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/FuzzyQueryNode.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/FuzzyQueryNode.java
index c3e4ade6384..e86b3ca0637 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/FuzzyQueryNode.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/FuzzyQueryNode.java
@@ -25,8 +25,6 @@ import org.apache.lucene.queryParser.core.parser.EscapeQuerySyntax;
*/
public class FuzzyQueryNode extends FieldQueryNode {
- private static final long serialVersionUID = -1794537213032589441L;
-
private float similarity;
private int prefixLength;
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/GroupQueryNode.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/GroupQueryNode.java
index 60e1f14051f..dcf1788fa43 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/GroupQueryNode.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/GroupQueryNode.java
@@ -34,8 +34,6 @@ import org.apache.lucene.queryParser.core.parser.EscapeQuerySyntax;
*/
public class GroupQueryNode extends QueryNodeImpl {
- private static final long serialVersionUID = -9204673493869114999L;
-
/**
* This QueryNode is used to identify parenthesis on the original query string
*/
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/MatchAllDocsQueryNode.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/MatchAllDocsQueryNode.java
index fea22340259..45507250c48 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/MatchAllDocsQueryNode.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/MatchAllDocsQueryNode.java
@@ -25,8 +25,6 @@ import org.apache.lucene.queryParser.core.parser.EscapeQuerySyntax;
*/
public class MatchAllDocsQueryNode extends QueryNodeImpl {
- private static final long serialVersionUID = -7050381275423477809L;
-
public MatchAllDocsQueryNode() {
// empty constructor
}
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/MatchNoDocsQueryNode.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/MatchNoDocsQueryNode.java
index f7ce910f4c6..c6147f3450c 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/MatchNoDocsQueryNode.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/MatchNoDocsQueryNode.java
@@ -24,8 +24,6 @@ package org.apache.lucene.queryParser.core.nodes;
*/
public class MatchNoDocsQueryNode extends DeletedQueryNode {
- private static final long serialVersionUID = 8081805751679581497L;
-
public MatchNoDocsQueryNode() {
// empty constructor
}
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/ModifierQueryNode.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/ModifierQueryNode.java
index 829f53f8bd5..cd35224bd81 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/ModifierQueryNode.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/ModifierQueryNode.java
@@ -36,8 +36,6 @@ import org.apache.lucene.queryParser.core.parser.EscapeQuerySyntax;
*/
public class ModifierQueryNode extends QueryNodeImpl {
- private static final long serialVersionUID = -391209837953928169L;
-
public enum Modifier {
MOD_NONE, MOD_NOT, MOD_REQ;
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/NoTokenFoundQueryNode.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/NoTokenFoundQueryNode.java
index 057f6af288b..19083fe8682 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/NoTokenFoundQueryNode.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/NoTokenFoundQueryNode.java
@@ -25,8 +25,6 @@ import org.apache.lucene.queryParser.core.parser.EscapeQuerySyntax;
*/
public class NoTokenFoundQueryNode extends DeletedQueryNode {
- private static final long serialVersionUID = 7332975497586993833L;
-
public NoTokenFoundQueryNode() {
super();
}
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/OpaqueQueryNode.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/OpaqueQueryNode.java
index 5ca0b72fc48..68ad4d4fafd 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/OpaqueQueryNode.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/OpaqueQueryNode.java
@@ -26,8 +26,6 @@ import org.apache.lucene.queryParser.core.parser.EscapeQuerySyntax;
*/
public class OpaqueQueryNode extends QueryNodeImpl {
- private static final long serialVersionUID = 0L;
-
private CharSequence schema = null;
private CharSequence value = null;
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/OrQueryNode.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/OrQueryNode.java
index e93c18e8269..eeb58695b41 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/OrQueryNode.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/OrQueryNode.java
@@ -29,8 +29,6 @@ import org.apache.lucene.queryParser.core.parser.EscapeQuerySyntax;
*/
public class OrQueryNode extends BooleanQueryNode {
- private static final long serialVersionUID = -3692323307688017852L;
-
/**
* @param clauses
* - the query nodes to be or'ed
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/ParametricQueryNode.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/ParametricQueryNode.java
index 8ccebf652ee..ce5cff6b819 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/ParametricQueryNode.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/ParametricQueryNode.java
@@ -25,8 +25,6 @@ import org.apache.lucene.queryParser.core.parser.EscapeQuerySyntax;
*/
public class ParametricQueryNode extends FieldQueryNode {
- private static final long serialVersionUID = -5770038129741218116L;
-
private CompareOperator operator;
public enum CompareOperator {
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/ParametricRangeQueryNode.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/ParametricRangeQueryNode.java
index 240d6010951..4580d84ed2d 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/ParametricRangeQueryNode.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/ParametricRangeQueryNode.java
@@ -29,8 +29,6 @@ import org.apache.lucene.queryParser.core.parser.EscapeQuerySyntax;
public class ParametricRangeQueryNode extends QueryNodeImpl implements
FieldableNode {
- private static final long serialVersionUID = 7120958816535573935L;
-
public ParametricRangeQueryNode(ParametricQueryNode lowerBound,
ParametricQueryNode upperBound) {
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/PathQueryNode.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/PathQueryNode.java
index 7364cbd2609..dfa3f7a775f 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/PathQueryNode.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/PathQueryNode.java
@@ -41,8 +41,6 @@ import org.apache.lucene.queryParser.core.parser.EscapeQuerySyntax.Type;
*/
public class PathQueryNode extends QueryNodeImpl {
- private static final long serialVersionUID = -8325921322405804789L;
-
public static class QueryText implements Cloneable {
CharSequence value = null;
/**
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/PhraseSlopQueryNode.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/PhraseSlopQueryNode.java
index 882c29f7912..46561f1afe5 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/PhraseSlopQueryNode.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/PhraseSlopQueryNode.java
@@ -26,8 +26,6 @@ import org.apache.lucene.queryParser.core.parser.EscapeQuerySyntax;
public class PhraseSlopQueryNode extends QueryNodeImpl implements FieldableNode {
- private static final long serialVersionUID = 0L;
-
private int value = 0;
/**
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/ProximityQueryNode.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/ProximityQueryNode.java
index b100b1aceb0..80fbcde5828 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/ProximityQueryNode.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/ProximityQueryNode.java
@@ -33,8 +33,6 @@ import org.apache.lucene.queryParser.core.parser.EscapeQuerySyntax;
*/
public class ProximityQueryNode extends BooleanQueryNode {
- private static final long serialVersionUID = 9018220596680832916L;
-
public enum Type {
PARAGRAPH {
@Override
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/QueryNode.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/QueryNode.java
index fac89f59f10..dcb980562e7 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/QueryNode.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/QueryNode.java
@@ -17,7 +17,6 @@ package org.apache.lucene.queryParser.core.nodes;
* limitations under the License.
*/
-import java.io.Serializable;
import java.util.List;
import java.util.Map;
@@ -27,7 +26,7 @@ import org.apache.lucene.queryParser.core.parser.EscapeQuerySyntax;
* 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
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/QueryNodeImpl.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/QueryNodeImpl.java
index 6b48cabb869..745d8f1529c 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/QueryNodeImpl.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/QueryNodeImpl.java
@@ -33,8 +33,6 @@ import org.apache.lucene.queryParser.core.util.StringUtils;
*/
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";
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/QuotedFieldQueryNode.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/QuotedFieldQueryNode.java
index 3daf42cbd23..7c39f57abad 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/QuotedFieldQueryNode.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/QuotedFieldQueryNode.java
@@ -25,8 +25,6 @@ import org.apache.lucene.queryParser.core.parser.EscapeQuerySyntax;
*/
public class QuotedFieldQueryNode extends FieldQueryNode {
- private static final long serialVersionUID = -6675157780051428987L;
-
/**
* @param field
* - field name
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/SlopQueryNode.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/SlopQueryNode.java
index 6b83580b6ed..fe87560025e 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/SlopQueryNode.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/SlopQueryNode.java
@@ -34,8 +34,6 @@ import org.apache.lucene.queryParser.core.parser.EscapeQuerySyntax;
*/
public class SlopQueryNode extends QueryNodeImpl implements FieldableNode {
- private static final long serialVersionUID = 0L;
-
private int value = 0;
/**
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/TokenizedPhraseQueryNode.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/TokenizedPhraseQueryNode.java
index d90c17ed489..0529d73a8dc 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/TokenizedPhraseQueryNode.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/TokenizedPhraseQueryNode.java
@@ -28,8 +28,6 @@ import org.apache.lucene.queryParser.core.parser.EscapeQuerySyntax;
public class TokenizedPhraseQueryNode extends QueryNodeImpl implements
FieldableNode {
- private static final long serialVersionUID = -7185108320787917541L;
-
public TokenizedPhraseQueryNode() {
setLeaf(false);
allocate();
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/package.html b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/package.html
index a03738e3f21..6d9b507d265 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/package.html
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/package.html
@@ -26,7 +26,7 @@ Contains query nodes that are commonly used by query parser implementations
<h2>Query Nodes</h2>
<p>
The package <tt>org.apache.lucene.queryParser.nodes</tt> 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}.
</p>
<p>
{@link org.apache.lucene.queryParser.core.nodes.QueryNode}s are used by the text parser to create a syntax tree.
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/processors/QueryNodeProcessorImpl.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/processors/QueryNodeProcessorImpl.java
index 97bedd043e5..3a9d9bb0c1c 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/processors/QueryNodeProcessorImpl.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/processors/QueryNodeProcessorImpl.java
@@ -244,8 +244,6 @@ public abstract class QueryNodeProcessorImpl implements QueryNodeProcessor {
private static class ChildrenList extends ArrayList<QueryNode> {
- private static final long serialVersionUID = -2613518456949297135L;
-
boolean beingUsed;
}
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/AllowLeadingWildcardAttributeImpl.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/AllowLeadingWildcardAttributeImpl.java
index c4f167bf8e4..97427870157 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/AllowLeadingWildcardAttributeImpl.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/AllowLeadingWildcardAttributeImpl.java
@@ -31,8 +31,6 @@ import org.apache.lucene.util.AttributeImpl;
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) {
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/AnalyzerAttributeImpl.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/AnalyzerAttributeImpl.java
index a9185bba491..d6f588c4135 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/AnalyzerAttributeImpl.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/AnalyzerAttributeImpl.java
@@ -33,8 +33,6 @@ import org.apache.lucene.util.AttributeImpl;
public class AnalyzerAttributeImpl extends AttributeImpl
implements AnalyzerAttribute {
- private static final long serialVersionUID = -6804760312723049526L;
-
private Analyzer analyzer;
public AnalyzerAttributeImpl() {
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/BoostAttributeImpl.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/BoostAttributeImpl.java
index fbcc46432c7..7ec16cb23df 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/BoostAttributeImpl.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/BoostAttributeImpl.java
@@ -33,8 +33,6 @@ import org.apache.lucene.util.AttributeImpl;
public class BoostAttributeImpl extends AttributeImpl
implements BoostAttribute {
- private static final long serialVersionUID = -2104763012523049527L;
-
private float boost = 1.0f;
public BoostAttributeImpl() {
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/DateResolutionAttributeImpl.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/DateResolutionAttributeImpl.java
index 621d90718e9..42b29d93235 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/DateResolutionAttributeImpl.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/DateResolutionAttributeImpl.java
@@ -33,8 +33,6 @@ import org.apache.lucene.util.AttributeImpl;
public class DateResolutionAttributeImpl extends AttributeImpl
implements DateResolutionAttribute {
- private static final long serialVersionUID = -6804360312723049526L;
-
private DateTools.Resolution dateResolution = null;
public DateResolutionAttributeImpl() {
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/DefaultOperatorAttributeImpl.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/DefaultOperatorAttributeImpl.java
index e99022da5a8..0899cc791a6 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/DefaultOperatorAttributeImpl.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/DefaultOperatorAttributeImpl.java
@@ -32,8 +32,6 @@ import org.apache.lucene.util.AttributeImpl;
public class DefaultOperatorAttributeImpl extends AttributeImpl
implements DefaultOperatorAttribute {
- private static final long serialVersionUID = -6804760312723049526L;
-
private Operator operator = Operator.OR;
public DefaultOperatorAttributeImpl() {
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/DefaultPhraseSlopAttributeImpl.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/DefaultPhraseSlopAttributeImpl.java
index 1f0ee2bf6c7..b457777eef6 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/DefaultPhraseSlopAttributeImpl.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/DefaultPhraseSlopAttributeImpl.java
@@ -32,8 +32,6 @@ import org.apache.lucene.util.AttributeImpl;
public class DefaultPhraseSlopAttributeImpl extends AttributeImpl
implements DefaultPhraseSlopAttribute {
- private static final long serialVersionUID = -2104763012527049527L;
-
private int defaultPhraseSlop = 0;
public DefaultPhraseSlopAttributeImpl() {
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/FieldBoostMapAttributeImpl.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/FieldBoostMapAttributeImpl.java
index debcc563450..852e931d188 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/FieldBoostMapAttributeImpl.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/FieldBoostMapAttributeImpl.java
@@ -36,8 +36,6 @@ import org.apache.lucene.util.AttributeImpl;
public class FieldBoostMapAttributeImpl extends AttributeImpl
implements FieldBoostMapAttribute {
- private static final long serialVersionUID = -2104763012523049527L;
-
private Map<String, Float> boosts = new LinkedHashMap<String, Float>();
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/FieldBoostMapFCListener.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/FieldBoostMapFCListener.java
index ab93ee9d531..fc4307aea7c 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/FieldBoostMapFCListener.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/FieldBoostMapFCListener.java
@@ -34,8 +34,6 @@ import org.apache.lucene.queryParser.core.config.QueryConfigHandler;
*/
public class FieldBoostMapFCListener implements FieldConfigListener {
- private static final long serialVersionUID = -5929802948798314067L;
-
private QueryConfigHandler config = null;
public FieldBoostMapFCListener(QueryConfigHandler config) {
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/FieldDateResolutionFCListener.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/FieldDateResolutionFCListener.java
index 0bdb9abc8ac..8afe94aaf60 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/FieldDateResolutionFCListener.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/FieldDateResolutionFCListener.java
@@ -36,8 +36,6 @@ import org.apache.lucene.queryParser.core.config.QueryConfigHandler;
*/
public class FieldDateResolutionFCListener implements FieldConfigListener {
- private static final long serialVersionUID = -5929802948798314067L;
-
private QueryConfigHandler config = null;
public FieldDateResolutionFCListener(QueryConfigHandler config) {
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/FieldDateResolutionMapAttributeImpl.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/FieldDateResolutionMapAttributeImpl.java
index ae9015e3f0f..f46efc4af99 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/FieldDateResolutionMapAttributeImpl.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/FieldDateResolutionMapAttributeImpl.java
@@ -33,8 +33,6 @@ import org.apache.lucene.util.AttributeImpl;
public class FieldDateResolutionMapAttributeImpl extends AttributeImpl
implements FieldDateResolutionMapAttribute {
- private static final long serialVersionUID = -2104763012523049527L;
-
private Map<CharSequence, DateTools.Resolution> dateRes = new HashMap<CharSequence, DateTools.Resolution>();
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/FuzzyAttributeImpl.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/FuzzyAttributeImpl.java
index 4cb85c4a6e3..4a6163400bd 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/FuzzyAttributeImpl.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/FuzzyAttributeImpl.java
@@ -33,8 +33,6 @@ import org.apache.lucene.util.AttributeImpl;
public class FuzzyAttributeImpl extends AttributeImpl
implements FuzzyAttribute {
- private static final long serialVersionUID = -2104763012527049527L;
-
private int prefixLength = FuzzyQuery.defaultPrefixLength;
private float minSimilarity = FuzzyQuery.defaultMinSimilarity;
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/LocaleAttributeImpl.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/LocaleAttributeImpl.java
index 495ab2a678b..e97595da1e1 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/LocaleAttributeImpl.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/LocaleAttributeImpl.java
@@ -33,8 +33,6 @@ import org.apache.lucene.util.AttributeImpl;
public class LocaleAttributeImpl extends AttributeImpl
implements LocaleAttribute {
- private static final long serialVersionUID = -6804760312720049526L;
-
private Locale locale = Locale.getDefault();
public LocaleAttributeImpl() {
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/LowercaseExpandedTermsAttributeImpl.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/LowercaseExpandedTermsAttributeImpl.java
index a18c8e28e32..ea85911a1a6 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/LowercaseExpandedTermsAttributeImpl.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/LowercaseExpandedTermsAttributeImpl.java
@@ -33,8 +33,6 @@ import org.apache.lucene.util.AttributeImpl;
public class LowercaseExpandedTermsAttributeImpl extends AttributeImpl
implements LowercaseExpandedTermsAttribute {
- private static final long serialVersionUID = -2804760312723049527L;
-
private boolean lowercaseExpandedTerms = true;
public LowercaseExpandedTermsAttributeImpl() {
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/MultiFieldAttributeImpl.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/MultiFieldAttributeImpl.java
index 7890a0148e7..8ffeb6dc0d3 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/MultiFieldAttributeImpl.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/MultiFieldAttributeImpl.java
@@ -33,8 +33,6 @@ import org.apache.lucene.util.AttributeImpl;
public class MultiFieldAttributeImpl extends AttributeImpl
implements MultiFieldAttribute {
- private static final long serialVersionUID = -6809760312720049526L;
-
private CharSequence[] fields;
public MultiFieldAttributeImpl() {
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/MultiTermRewriteMethodAttributeImpl.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/MultiTermRewriteMethodAttributeImpl.java
index a6dda510361..6ef930361b7 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/MultiTermRewriteMethodAttributeImpl.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/MultiTermRewriteMethodAttributeImpl.java
@@ -33,8 +33,6 @@ import org.apache.lucene.util.AttributeImpl;
*/
public class MultiTermRewriteMethodAttributeImpl extends AttributeImpl
implements MultiTermRewriteMethodAttribute {
-
- private static final long serialVersionUID = -2104763012723049527L;
private MultiTermQuery.RewriteMethod multiTermRewriteMethod = MultiTermQuery.CONSTANT_SCORE_AUTO_REWRITE_DEFAULT;
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/PositionIncrementsAttributeImpl.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/PositionIncrementsAttributeImpl.java
index 529d459d9a9..e4ec12e1c6d 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/PositionIncrementsAttributeImpl.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/PositionIncrementsAttributeImpl.java
@@ -31,8 +31,6 @@ import org.apache.lucene.util.AttributeImpl;
public class PositionIncrementsAttributeImpl extends AttributeImpl
implements PositionIncrementsAttribute {
- private static final long serialVersionUID = -2804763012793049527L;
-
private boolean positionIncrementsEnabled = false;
public PositionIncrementsAttributeImpl() {
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/RangeCollatorAttributeImpl.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/RangeCollatorAttributeImpl.java
index 70ac5e69636..6f3e1869544 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/RangeCollatorAttributeImpl.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/config/RangeCollatorAttributeImpl.java
@@ -35,8 +35,6 @@ import org.apache.lucene.util.AttributeImpl;
public class RangeCollatorAttributeImpl extends AttributeImpl
implements RangeCollatorAttribute {
- private static final long serialVersionUID = -6804360312723049526L;
-
private Collator rangeCollator;
public RangeCollatorAttributeImpl() {
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/BooleanModifierNode.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/BooleanModifierNode.java
index 41bf1455d31..93b11008e04 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/BooleanModifierNode.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/BooleanModifierNode.java
@@ -30,8 +30,6 @@ import org.apache.lucene.queryParser.standard.processors.GroupQueryNodeProcessor
*/
public class BooleanModifierNode extends ModifierQueryNode {
- private static final long serialVersionUID = -557816496416587068L;
-
public BooleanModifierNode(QueryNode node, Modifier mod) {
super(node, mod);
}
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/MultiPhraseQueryNode.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/MultiPhraseQueryNode.java
index 38c5f3d740b..2736789c1e3 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/MultiPhraseQueryNode.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/MultiPhraseQueryNode.java
@@ -33,8 +33,6 @@ import org.apache.lucene.search.PhraseQuery;
public class MultiPhraseQueryNode extends QueryNodeImpl implements
FieldableNode {
- private static final long serialVersionUID = -2138501723963320158L;
-
public MultiPhraseQueryNode() {
setLeaf(false);
allocate();
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/PrefixWildcardQueryNode.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/PrefixWildcardQueryNode.java
index b1cc2629e0d..7741d6021de 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/PrefixWildcardQueryNode.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/PrefixWildcardQueryNode.java
@@ -27,8 +27,6 @@ import org.apache.lucene.queryParser.core.nodes.FieldQueryNode;
*/
public class PrefixWildcardQueryNode extends WildcardQueryNode {
- private static final long serialVersionUID = 6851557641826407515L;
-
/**
* @param field
* - field name
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/RangeQueryNode.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/RangeQueryNode.java
index 6578ab0aa78..290f5ecdff0 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/RangeQueryNode.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/RangeQueryNode.java
@@ -34,8 +34,6 @@ import org.apache.lucene.queryParser.standard.processors.ParametricRangeQueryNod
*/
public class RangeQueryNode extends ParametricRangeQueryNode {
- private static final long serialVersionUID = 7400866652044314657L;
-
private Collator collator;
/**
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/RegexpQueryNode.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/RegexpQueryNode.java
index 7e4f9896a12..be8659d5c95 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/RegexpQueryNode.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/RegexpQueryNode.java
@@ -29,7 +29,6 @@ import org.apache.lucene.util.BytesRef;
*/
public class RegexpQueryNode extends QueryNodeImpl implements TextableQueryNode,
FieldableNode {
- private static final long serialVersionUID = 0L;
private CharSequence text;
private CharSequence field;
/**
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/StandardBooleanQueryNode.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/StandardBooleanQueryNode.java
index d09d234a04d..13e922121d3 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/StandardBooleanQueryNode.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/StandardBooleanQueryNode.java
@@ -34,8 +34,6 @@ import org.apache.lucene.search.SimilarityProvider;
*/
public class StandardBooleanQueryNode extends BooleanQueryNode {
- private static final long serialVersionUID = 1938287817191138787L;
-
private boolean disableCoord;
/**
diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/WildcardQueryNode.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/WildcardQueryNode.java
index 3bc32672140..3e4d938101d 100644
--- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/WildcardQueryNode.java
+++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/nodes/WildcardQueryNode.java
@@ -25,7 +25,6 @@ import org.apache.lucene.queryParser.core.parser.EscapeQuerySyntax;
* phrases. Examples: a*b*c Fl?w? m?ke*g
*/
public class WildcardQueryNode extends FieldQueryNode {
- private static final long serialVersionUID = 0L;
/**
* @param field
diff --git a/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/spans/UniqueFieldAttributeImpl.java b/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/spans/UniqueFieldAttributeImpl.java
index 0cb8b4ab7dd..7fce3a8460c 100644
--- a/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/spans/UniqueFieldAttributeImpl.java
+++ b/lucene/contrib/queryparser/src/test/org/apache/lucene/queryParser/spans/UniqueFieldAttributeImpl.java
@@ -31,8 +31,6 @@ import org.apache.lucene.util.AttributeImpl;
public class UniqueFieldAttributeImpl extends AttributeImpl implements
UniqueFieldAttribute {
- private static final long serialVersionUID = 8553318595851064232L;
-
private CharSequence uniqueField;
public UniqueFieldAttributeImpl() {
diff --git a/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/geohash/GeoHashDistanceFilter.java b/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/geohash/GeoHashDistanceFilter.java
index 2751dbc9e34..875a56a0fbd 100644
--- a/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/geohash/GeoHashDistanceFilter.java
+++ b/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/geohash/GeoHashDistanceFilter.java
@@ -36,11 +36,6 @@ import org.apache.lucene.spatial.tier.DistanceFilter;
*/
public class GeoHashDistanceFilter extends DistanceFilter {
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
private double lat;
private double lng;
diff --git a/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceFieldComparatorSource.java b/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceFieldComparatorSource.java
index dec1f88b14c..f9564694297 100644
--- a/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceFieldComparatorSource.java
+++ b/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceFieldComparatorSource.java
@@ -31,8 +31,6 @@ import org.apache.lucene.search.FieldComparatorSource;
*/
public class DistanceFieldComparatorSource extends FieldComparatorSource {
- private static final long serialVersionUID = 1L;
-
private DistanceFilter distanceFilter;
private DistanceScoreDocLookupComparator dsdlc;
diff --git a/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceFilter.java b/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceFilter.java
index 497c45e297e..22a5385d081 100644
--- a/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceFilter.java
+++ b/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceFilter.java
@@ -19,8 +19,6 @@ package org.apache.lucene.spatial.tier;
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 @@ public abstract class DistanceFilter extends Filter {
distanceLookupCache = new WeakHashMap<String,Double>();
}
- /** needed for deserialization, because the cache is transient */
- private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException {
- stream.defaultReadObject();
- distanceLookupCache = new WeakHashMap<String,Double>();
- }
-
public Map<Integer,Double> getDistances(){
return distances;
}
diff --git a/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceQueryBuilder.java b/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceQueryBuilder.java
index ed7393651b1..418a4f7d092 100644
--- a/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceQueryBuilder.java
+++ b/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceQueryBuilder.java
@@ -30,8 +30,6 @@ import org.apache.lucene.spatial.geohash.GeoHashDistanceFilter;
* release.</font>
*/
public class DistanceQueryBuilder {
-
- private static final long serialVersionUID = 1L;
private final double lat;
private final double lng;
diff --git a/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/InvalidGeoException.java b/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/InvalidGeoException.java
index 1338b94cae3..0f8daacf800 100644
--- a/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/InvalidGeoException.java
+++ b/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/InvalidGeoException.java
@@ -24,11 +24,6 @@ package org.apache.lucene.spatial.tier;
*/
public class InvalidGeoException extends Exception {
- /**
- *
- */
- private static final long serialVersionUID = 1L;
-
public InvalidGeoException(String message){
super(message);
}
diff --git a/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/LatLongDistanceFilter.java b/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/LatLongDistanceFilter.java
index 94c3bd86ba0..4574e773890 100644
--- a/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/LatLongDistanceFilter.java
+++ b/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/LatLongDistanceFilter.java
@@ -33,11 +33,6 @@ import org.apache.lucene.spatial.DistanceUtils;
* release.</font>
*/
public class LatLongDistanceFilter extends DistanceFilter {
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
double lat;
double lng;
diff --git a/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/Shape.java b/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/Shape.java
index 2a5bdbbf087..5b95b3f8421 100644
--- a/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/Shape.java
+++ b/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/Shape.java
@@ -17,7 +17,6 @@
package org.apache.lucene.spatial.tier;
-import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
@@ -26,7 +25,7 @@ import java.util.List;
* flux and might change in incompatible ways in the next
* release.</font>
*/
-public class Shape implements Serializable{
+public class Shape {
private List<Double> area = new ArrayList<Double>();
private String tierId;
diff --git a/lucene/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestCartesianShapeFilter.java b/lucene/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestCartesianShapeFilter.java
deleted file mode 100644
index 55a941fedf5..00000000000
--- a/lucene/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestCartesianShapeFilter.java
+++ /dev/null
@@ -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()+"]");
- }
- }
-
-}
diff --git a/lucene/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/NumericRangeFilterBuilder.java b/lucene/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/NumericRangeFilterBuilder.java
index ea5f5741c34..b6ff2950649 100644
--- a/lucene/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/NumericRangeFilterBuilder.java
+++ b/lucene/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/NumericRangeFilterBuilder.java
@@ -154,7 +154,6 @@ public class NumericRangeFilterBuilder implements FilterBuilder {
}
static class NoMatchFilter extends Filter {
- private static final long serialVersionUID = 1L;
@Override
public DocIdSet getDocIdSet(AtomicReaderContext context) throws IOException {
diff --git a/lucene/src/java/org/apache/lucene/analysis/tokenattributes/CharTermAttributeImpl.java b/lucene/src/java/org/apache/lucene/analysis/tokenattributes/CharTermAttributeImpl.java
index d45d280f73c..677f8d53da8 100644
--- a/lucene/src/java/org/apache/lucene/analysis/tokenattributes/CharTermAttributeImpl.java
+++ b/lucene/src/java/org/apache/lucene/analysis/tokenattributes/CharTermAttributeImpl.java
@@ -17,7 +17,6 @@ package org.apache.lucene.analysis.tokenattributes;
* limitations under the License.
*/
-import java.io.Serializable;
import java.nio.CharBuffer;
import org.apache.lucene.util.ArrayUtil;
@@ -30,7 +29,7 @@ import org.apache.lucene.util.UnicodeUtil;
/**
* 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)];
diff --git a/lucene/src/java/org/apache/lucene/analysis/tokenattributes/FlagsAttributeImpl.java b/lucene/src/java/org/apache/lucene/analysis/tokenattributes/FlagsAttributeImpl.java
index 986864a3470..eae06b2636a 100644
--- a/lucene/src/java/org/apache/lucene/analysis/tokenattributes/FlagsAttributeImpl.java
+++ b/lucene/src/java/org/apache/lucene/analysis/tokenattributes/FlagsAttributeImpl.java
@@ -17,8 +17,6 @@ package org.apache.lucene.analysis.tokenattributes;
* limitations under the License.
*/
-import java.io.Serializable;
-
import org.apache.lucene.util.AttributeImpl;
/**
@@ -26,7 +24,7 @@ import org.apache.lucene.util.AttributeImpl;
* 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;
/**
diff --git a/lucene/src/java/org/apache/lucene/analysis/tokenattributes/OffsetAttributeImpl.java b/lucene/src/java/org/apache/lucene/analysis/tokenattributes/OffsetAttributeImpl.java
index 0593200a18e..72191f42b54 100644
--- a/lucene/src/java/org/apache/lucene/analysis/tokenattributes/OffsetAttributeImpl.java
+++ b/lucene/src/java/org/apache/lucene/analysis/tokenattributes/OffsetAttributeImpl.java
@@ -17,14 +17,12 @@ package org.apache.lucene.analysis.tokenattributes;
* 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;
diff --git a/lucene/src/java/org/apache/lucene/analysis/tokenattributes/PayloadAttributeImpl.java b/lucene/src/java/org/apache/lucene/analysis/tokenattributes/PayloadAttributeImpl.java
index 5c697c509df..22e5903e2af 100644
--- a/lucene/src/java/org/apache/lucene/analysis/tokenattributes/PayloadAttributeImpl.java
+++ b/lucene/src/java/org/apache/lucene/analysis/tokenattributes/PayloadAttributeImpl.java
@@ -17,15 +17,13 @@ package org.apache.lucene.analysis.tokenattributes;
* 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;
/**
diff --git a/lucene/src/java/org/apache/lucene/analysis/tokenattributes/PositionIncrementAttributeImpl.java b/lucene/src/java/org/apache/lucene/analysis/tokenattributes/PositionIncrementAttributeImpl.java
index 7ab4c69f142..7d3239abbae 100644
--- a/lucene/src/java/org/apache/lucene/analysis/tokenattributes/PositionIncrementAttributeImpl.java
+++ b/lucene/src/java/org/apache/lucene/analysis/tokenattributes/PositionIncrementAttributeImpl.java
@@ -17,8 +17,6 @@ package org.apache.lucene.analysis.tokenattributes;
* limitations under the License.
*/
-import java.io.Serializable;
-
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.util.AttributeImpl;
@@ -46,7 +44,7 @@ import org.apache.lucene.util.AttributeImpl;
*
* </ul>
*/
-public class PositionIncrementAttributeImpl extends AttributeImpl implements PositionIncrementAttribute, Cloneable, Serializable {
+public class PositionIncrementAttributeImpl extends AttributeImpl implements PositionIncrementAttribute, Cloneable {
private int positionIncrement = 1;
/** Set the position increment. The default value is one.
diff --git a/lucene/src/java/org/apache/lucene/analysis/tokenattributes/TypeAttributeImpl.java b/lucene/src/java/org/apache/lucene/analysis/tokenattributes/TypeAttributeImpl.java
index 3c3b7abc70e..045b30dda33 100644
--- a/lucene/src/java/org/apache/lucene/analysis/tokenattributes/TypeAttributeImpl.java
+++ b/lucene/src/java/org/apache/lucene/analysis/tokenattributes/TypeAttributeImpl.java
@@ -17,14 +17,12 @@ package org.apache.lucene.analysis.tokenattributes;
* 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() {
diff --git a/lucene/src/java/org/apache/lucene/document/Document.java b/lucene/src/java/org/apache/lucene/document/Document.java
index 58e7a7ee3c3..0343f673e5a 100644
--- a/lucene/src/java/org/apache/lucene/document/Document.java
+++ b/lucene/src/java/org/apache/lucene/document/Document.java
@@ -35,7 +35,7 @@ import org.apache.lucene.index.IndexReader; // for javadoc
* ScoreDoc#doc} or {@link IndexReader#document(int)}.
*/
-public final class Document implements java.io.Serializable {
+public final class Document {
List<Fieldable> fields = new ArrayList<Fieldable>();
private float boost = 1.0f;
diff --git a/lucene/src/java/org/apache/lucene/document/Field.java b/lucene/src/java/org/apache/lucene/document/Field.java
index 8ab55f390c2..6c6bccb79f1 100644
--- a/lucene/src/java/org/apache/lucene/document/Field.java
+++ b/lucene/src/java/org/apache/lucene/document/Field.java
@@ -18,7 +18,6 @@ package org.apache.lucene.document;
*/
import java.io.Reader;
-import java.io.Serializable;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.index.IndexWriter;
@@ -32,7 +31,7 @@ import org.apache.lucene.util.StringHelper;
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 {
diff --git a/lucene/src/java/org/apache/lucene/document/FieldSelector.java b/lucene/src/java/org/apache/lucene/document/FieldSelector.java
index 079ade6ffb5..da98add236e 100755
--- a/lucene/src/java/org/apache/lucene/document/FieldSelector.java
+++ b/lucene/src/java/org/apache/lucene/document/FieldSelector.java
@@ -1,6 +1,5 @@
package org.apache.lucene.document;
-import java.io.Serializable;
/**
* Copyright 2004 The Apache Software Foundation
*
@@ -22,7 +21,7 @@ import java.io.Serializable;
* what Fields get loaded on a {@link Document} by {@link org.apache.lucene.index.IndexReader#document(int,org.apache.lucene.document.FieldSelector)}
*
**/
-public interface FieldSelector extends Serializable {
+public interface FieldSelector {
/**
*
diff --git a/lucene/src/java/org/apache/lucene/document/Fieldable.java b/lucene/src/java/org/apache/lucene/document/Fieldable.java
index 561d4df8140..20616d473c9 100755
--- a/lucene/src/java/org/apache/lucene/document/Fieldable.java
+++ b/lucene/src/java/org/apache/lucene/document/Fieldable.java
@@ -22,7 +22,6 @@ import org.apache.lucene.search.PhraseQuery; // for javadocs
import org.apache.lucene.search.spans.SpanQuery; // for javadocs
import java.io.Reader;
-import java.io.Serializable;
/**
* Synonymous with {@link Field}.
@@ -34,7 +33,7 @@ import java.io.Serializable;
* </p>
*
**/
-public interface Fieldable extends Serializable {
+public interface Fieldable {
/** Sets the boost factor hits on this field. This value will be
* multiplied into the score of all hits on this this field of this
* document.
diff --git a/lucene/src/java/org/apache/lucene/index/Payload.java b/lucene/src/java/org/apache/lucene/index/Payload.java
index f7639a3830f..34b91a18630 100644
--- a/lucene/src/java/org/apache/lucene/index/Payload.java
+++ b/lucene/src/java/org/apache/lucene/index/Payload.java
@@ -17,8 +17,6 @@ package org.apache.lucene.index;
* limitations under the License.
*/
-import java.io.Serializable;
-
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.util.ArrayUtil;
@@ -34,7 +32,7 @@ import org.apache.lucene.util.ArrayUtil;
* to retrieve the payloads from the index.<br>
*
*/
-public class Payload implements Serializable, Cloneable {
+public class Payload implements Cloneable {
/** the byte array containing the payload data */
protected byte[] data;
diff --git a/lucene/src/java/org/apache/lucene/index/Term.java b/lucene/src/java/org/apache/lucene/index/Term.java
index 04e275ec4d3..914684a640e 100644
--- a/lucene/src/java/org/apache/lucene/index/Term.java
+++ b/lucene/src/java/org/apache/lucene/index/Term.java
@@ -30,7 +30,7 @@ import org.apache.lucene.util.StringHelper;
Note that terms may represent more than words from text fields, but also
things like dates, email addresses, urls, etc. */
-public final class Term implements Comparable<Term>, java.io.Serializable {
+public final class Term implements Comparable<Term> {
String field;
BytesRef bytes;
@@ -199,11 +199,4 @@ public final class Term implements Comparable<Term>, java.io.Serializable {
@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);
- }
}
diff --git a/lucene/src/java/org/apache/lucene/index/TermVectorOffsetInfo.java b/lucene/src/java/org/apache/lucene/index/TermVectorOffsetInfo.java
index 5deb626df94..428894532b2 100644
--- a/lucene/src/java/org/apache/lucene/index/TermVectorOffsetInfo.java
+++ b/lucene/src/java/org/apache/lucene/index/TermVectorOffsetInfo.java
@@ -1,7 +1,5 @@
package org.apache.lucene.index;
-import java.io.Serializable;
-
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -24,7 +22,7 @@ import java.io.Serializable;
* offset information. This offset information is the character offset as set during the Analysis phase (and thus may not be the actual offset in the
* original content).
*/
-public class TermVectorOffsetInfo implements Serializable {
+public class TermVectorOffsetInfo {
/**
* Convenience declaration when creating a {@link org.apache.lucene.index.TermPositionVector} that stores only position information.
*/
diff --git a/lucene/src/java/org/apache/lucene/messages/Message.java b/lucene/src/java/org/apache/lucene/messages/Message.java
index f56f57999bd..df7ac827019 100644
--- a/lucene/src/java/org/apache/lucene/messages/Message.java
+++ b/lucene/src/java/org/apache/lucene/messages/Message.java
@@ -17,14 +17,13 @@ package org.apache.lucene.messages;
* limitations under the License.
*/
-import java.io.Serializable;
import java.util.Locale;
/**
* Message Interface for a lazy loading.
* For Native Language Support (NLS), system of software internationalization.
*/
-public interface Message extends Serializable {
+public interface Message {
public String getKey();
diff --git a/lucene/src/java/org/apache/lucene/messages/MessageImpl.java b/lucene/src/java/org/apache/lucene/messages/MessageImpl.java
index cb837351f12..78d8e2b42ef 100644
--- a/lucene/src/java/org/apache/lucene/messages/MessageImpl.java
+++ b/lucene/src/java/org/apache/lucene/messages/MessageImpl.java
@@ -25,8 +25,6 @@ import java.util.Locale;
*/
public class MessageImpl implements Message {
- private static final long serialVersionUID = -3077643314630884523L;
-
private String key;
private Object[] arguments = new Object[0];
diff --git a/lucene/src/java/org/apache/lucene/search/AutomatonQuery.java b/lucene/src/java/org/apache/lucene/search/AutomatonQuery.java
index 4df94c4486e..a8368339d4d 100644
--- a/lucene/src/java/org/apache/lucene/search/AutomatonQuery.java
+++ b/lucene/src/java/org/apache/lucene/search/AutomatonQuery.java
@@ -18,7 +18,6 @@ package org.apache.lucene.search;
*/
import java.io.IOException;
-import java.io.Serializable;
import org.apache.lucene.index.Term;
import org.apache.lucene.index.Terms;
@@ -61,7 +60,7 @@ public class AutomatonQuery extends MultiTermQuery {
* in the ctor the query computes one of these, the actual
* implementation depends upon the automaton's structure.
*/
- private abstract class TermsEnumFactory implements Serializable {
+ private abstract class TermsEnumFactory {
protected abstract TermsEnum getTermsEnum(Terms terms, AttributeSource atts) throws IOException;
}
diff --git a/lucene/src/java/org/apache/lucene/search/BooleanClause.java b/lucene/src/java/org/apache/lucene/search/BooleanClause.java
index 6212a3703a0..91af8e60eec 100644
--- a/lucene/src/java/org/apache/lucene/search/BooleanClause.java
+++ b/lucene/src/java/org/apache/lucene/search/BooleanClause.java
@@ -18,7 +18,7 @@ package org.apache.lucene.search;
*/
/** A clause in a BooleanQuery. */
-public class BooleanClause implements java.io.Serializable {
+public class BooleanClause {
/** Specifies how clauses are to occur in matching documents. */
public static enum Occur {
diff --git a/lucene/src/java/org/apache/lucene/search/CachingWrapperFilter.java b/lucene/src/java/org/apache/lucene/search/CachingWrapperFilter.java
index 1f865670b56..e726aa8d268 100644
--- a/lucene/src/java/org/apache/lucene/search/CachingWrapperFilter.java
+++ b/lucene/src/java/org/apache/lucene/search/CachingWrapperFilter.java
@@ -17,7 +17,6 @@ package org.apache.lucene.search;
* limitations under the License.
*/
-import java.io.Serializable;
import java.io.IOException;
import java.util.Map;
import java.util.WeakHashMap;
@@ -68,7 +67,7 @@ public class CachingWrapperFilter extends Filter {
protected final FilterCache<DocIdSet> cache;
- static abstract class FilterCache<T> implements Serializable {
+ static abstract class FilterCache<T> {
/**
* A transient Filter cache (package private because of test)
diff --git a/lucene/src/java/org/apache/lucene/search/Explanation.java b/lucene/src/java/org/apache/lucene/search/Explanation.java
index 6798c1c0d3c..299752841b5 100644
--- a/lucene/src/java/org/apache/lucene/search/Explanation.java
+++ b/lucene/src/java/org/apache/lucene/search/Explanation.java
@@ -17,11 +17,10 @@ package org.apache.lucene.search;
* limitations under the License.
*/
-import java.io.Serializable;
import java.util.ArrayList;
/** Expert: Describes the score computation for document and query. */
-public class Explanation implements java.io.Serializable {
+public class Explanation {
private float value; // the value of this node
private String description; // what it represents
private ArrayList<Explanation> details; // sub-explanations
@@ -135,7 +134,7 @@ public class Explanation implements java.io.Serializable {
* before storing any large or un-serializable fields.
*
*/
- public static abstract class IDFExplanation implements Serializable {
+ public static abstract class IDFExplanation {
/**
* @return the idf factor
*/
diff --git a/lucene/src/java/org/apache/lucene/search/FieldCache.java b/lucene/src/java/org/apache/lucene/search/FieldCache.java
index 169a0e46c0e..e286a3414b3 100644
--- a/lucene/src/java/org/apache/lucene/search/FieldCache.java
+++ b/lucene/src/java/org/apache/lucene/search/FieldCache.java
@@ -29,7 +29,6 @@ import org.apache.lucene.analysis.NumericTokenStream; // for javadocs
import org.apache.lucene.util.packed.PackedInts;
import java.io.IOException;
-import java.io.Serializable;
import java.io.PrintStream;
import java.text.DecimalFormat;
@@ -61,7 +60,7 @@ public interface FieldCache {
* is used to specify a custom parser to {@link
* SortField#SortField(String, FieldCache.Parser)}.
*/
- public interface Parser extends Serializable {
+ public interface Parser {
}
/** Interface to parse bytes from document fields.
diff --git a/lucene/src/java/org/apache/lucene/search/FieldComparatorSource.java b/lucene/src/java/org/apache/lucene/search/FieldComparatorSource.java
index a0613afb73b..f7ca0642ac9 100644
--- a/lucene/src/java/org/apache/lucene/search/FieldComparatorSource.java
+++ b/lucene/src/java/org/apache/lucene/search/FieldComparatorSource.java
@@ -18,7 +18,6 @@ package org.apache.lucene.search;
*/
import java.io.IOException;
-import java.io.Serializable;
/**
* Provides a {@link FieldComparator} for custom field sorting.
@@ -26,7 +25,7 @@ import java.io.Serializable;
* @lucene.experimental
*
*/
-public abstract class FieldComparatorSource implements Serializable {
+public abstract class FieldComparatorSource {
/**
* Creates a comparator for the field in the given index.
diff --git a/lucene/src/java/org/apache/lucene/search/Filter.java b/lucene/src/java/org/apache/lucene/search/Filter.java
index 468a43b663c..22bd820c798 100644
--- a/lucene/src/java/org/apache/lucene/search/Filter.java
+++ b/lucene/src/java/org/apache/lucene/search/Filter.java
@@ -27,7 +27,7 @@ import org.apache.lucene.util.DocIdBitSet;
* 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
diff --git a/lucene/src/java/org/apache/lucene/search/MultiTermQuery.java b/lucene/src/java/org/apache/lucene/search/MultiTermQuery.java
index 8051d7fc160..363922a0b1d 100644
--- a/lucene/src/java/org/apache/lucene/search/MultiTermQuery.java
+++ b/lucene/src/java/org/apache/lucene/search/MultiTermQuery.java
@@ -18,7 +18,6 @@ package org.apache.lucene.search;
*/
import java.io.IOException;
-import java.io.Serializable;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.Term;
@@ -67,7 +66,7 @@ public abstract class MultiTermQuery extends Query {
transient int numberOfTerms = 0;
/** Abstract class that defines how the query is rewritten. */
- public static abstract class RewriteMethod implements Serializable {
+ public static abstract class RewriteMethod {
public abstract Query rewrite(IndexReader reader, MultiTermQuery query) throws IOException;
}
@@ -90,11 +89,6 @@ public abstract class MultiTermQuery extends Query {
result.setBoost(query.getBoost());
return result;
}
-
- // Make sure we are still a singleton even after deserializing
- protected Object readResolve() {
- return CONSTANT_SCORE_FILTER_REWRITE;
- }
};
/** A rewrite method that first translates each term into
@@ -240,11 +234,6 @@ public abstract class MultiTermQuery extends Query {
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;
- }
};
/**
diff --git a/lucene/src/java/org/apache/lucene/search/Query.java b/lucene/src/java/org/apache/lucene/search/Query.java
index 8b937aa5b32..40ec80d44a5 100644
--- a/lucene/src/java/org/apache/lucene/search/Query.java
+++ b/lucene/src/java/org/apache/lucene/search/Query.java
@@ -44,7 +44,7 @@ import org.apache.lucene.index.Term;
<li>{@link org.apache.lucene.queryParser.QueryParser QueryParser}
</ul>
*/
-public abstract class Query implements java.io.Serializable, Cloneable {
+public abstract class Query implements Cloneable {
private float boost = 1.0f; // query boost factor
/** Sets the boost for this query clause to <code>b</code>. Documents
diff --git a/lucene/src/java/org/apache/lucene/search/ScoreDoc.java b/lucene/src/java/org/apache/lucene/search/ScoreDoc.java
index f2828d509a8..47d9fa7d5a7 100644
--- a/lucene/src/java/org/apache/lucene/search/ScoreDoc.java
+++ b/lucene/src/java/org/apache/lucene/search/ScoreDoc.java
@@ -19,7 +19,7 @@ package org.apache.lucene.search;
/** Expert: Returned by low-level search implementations.
* @see TopDocs */
-public class ScoreDoc implements java.io.Serializable {
+public class ScoreDoc {
/** Expert: The score of this document for the query. */
public float score;
diff --git a/lucene/src/java/org/apache/lucene/search/Similarity.java b/lucene/src/java/org/apache/lucene/search/Similarity.java
index 306f904c270..4333bccda2e 100644
--- a/lucene/src/java/org/apache/lucene/search/Similarity.java
+++ b/lucene/src/java/org/apache/lucene/search/Similarity.java
@@ -19,7 +19,6 @@ package org.apache.lucene.search;
import java.io.IOException;
-import java.io.Serializable;
import java.util.Collection;
import org.apache.lucene.index.FieldInvertState;
@@ -525,7 +524,7 @@ import org.apache.lucene.util.SmallFloat;
* @see org.apache.lucene.index.IndexWriterConfig#setSimilarityProvider(SimilarityProvider)
* @see IndexSearcher#setSimilarityProvider(SimilarityProvider)
*/
-public abstract class Similarity implements Serializable {
+public abstract class Similarity {
public static final int NO_DOC_ID_PROVIDED = -1;
diff --git a/lucene/src/java/org/apache/lucene/search/Sort.java b/lucene/src/java/org/apache/lucene/search/Sort.java
index 7969c991609..c06d79b36b2 100644
--- a/lucene/src/java/org/apache/lucene/search/Sort.java
+++ b/lucene/src/java/org/apache/lucene/search/Sort.java
@@ -17,7 +17,6 @@ package org.apache.lucene.search;
* limitations under the License.
*/
-import java.io.Serializable;
import java.util.Arrays;
@@ -97,8 +96,7 @@ import java.util.Arrays;
*
* @since lucene 1.4
*/
-public class Sort
-implements Serializable {
+public class Sort {
/**
* Represents sorting by computed relevance. Using this sort criteria returns
diff --git a/lucene/src/java/org/apache/lucene/search/SortField.java b/lucene/src/java/org/apache/lucene/search/SortField.java
index 663261ebd59..cf2cc8a1f26 100644
--- a/lucene/src/java/org/apache/lucene/search/SortField.java
+++ b/lucene/src/java/org/apache/lucene/search/SortField.java
@@ -18,7 +18,6 @@ package org.apache.lucene.search;
*/
import java.io.IOException;
-import java.io.Serializable;
import java.util.Locale;
import org.apache.lucene.search.cache.*;
@@ -33,8 +32,7 @@ import org.apache.lucene.util.StringHelper;
* @since lucene 1.4
* @see Sort
*/
-public class SortField
-implements Serializable {
+public class SortField {
/** Sort by document score (relevance). Sort values are Float and higher
* values are at the front. */
@@ -427,13 +425,6 @@ implements Serializable {
return hash;
}
- // field must be interned after reading from stream
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- in.defaultReadObject();
- if (field != null)
- field = StringHelper.intern(field);
- }
-
/** Returns the {@link FieldComparator} to use for
* sorting.
*
diff --git a/lucene/src/java/org/apache/lucene/search/TopDocs.java b/lucene/src/java/org/apache/lucene/search/TopDocs.java
index 6d14f88bb20..ba5f3e45252 100644
--- a/lucene/src/java/org/apache/lucene/search/TopDocs.java
+++ b/lucene/src/java/org/apache/lucene/search/TopDocs.java
@@ -20,7 +20,7 @@ package org.apache.lucene.search;
/** Represents hits returned by {@link
* IndexSearcher#search(Query,Filter,int)} and {@link
* IndexSearcher#search(Query,int)}. */
-public class TopDocs implements java.io.Serializable {
+public class TopDocs {
/** The total number of hits for the query.
*/
public int totalHits;
diff --git a/lucene/src/java/org/apache/lucene/search/Weight.java b/lucene/src/java/org/apache/lucene/search/Weight.java
index 7ea739b7e1e..3fb892714c6 100644
--- a/lucene/src/java/org/apache/lucene/search/Weight.java
+++ b/lucene/src/java/org/apache/lucene/search/Weight.java
@@ -18,7 +18,6 @@ package org.apache.lucene.search;
*/
import java.io.IOException;
-import java.io.Serializable;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.IndexReader.AtomicReaderContext;
@@ -54,7 +53,7 @@ import org.apache.lucene.index.IndexReader.ReaderContext;
*
* @since 2.9
*/
-public abstract class Weight implements Serializable {
+public abstract class Weight {
/**
* An explanation of the score computation for the named document.
diff --git a/lucene/src/java/org/apache/lucene/search/cache/EntryCreator.java b/lucene/src/java/org/apache/lucene/search/cache/EntryCreator.java
index 362cc83a71e..43e42f2ff06 100644
--- a/lucene/src/java/org/apache/lucene/search/cache/EntryCreator.java
+++ b/lucene/src/java/org/apache/lucene/search/cache/EntryCreator.java
@@ -18,7 +18,6 @@ package org.apache.lucene.search.cache;
*/
import java.io.IOException;
-import java.io.Serializable;
import org.apache.lucene.index.IndexReader;
@@ -27,7 +26,7 @@ import org.apache.lucene.index.IndexReader;
*
* @lucene.experimental
*/
-public abstract class EntryCreator<T> implements Serializable
+public abstract class EntryCreator<T>
{
public abstract T create( IndexReader reader ) throws IOException;
public abstract T validate( T entry, IndexReader reader ) throws IOException;
diff --git a/lucene/src/java/org/apache/lucene/search/function/ValueSource.java b/lucene/src/java/org/apache/lucene/search/function/ValueSource.java
index debaa1615b5..58485aeee65 100755
--- a/lucene/src/java/org/apache/lucene/search/function/ValueSource.java
+++ b/lucene/src/java/org/apache/lucene/search/function/ValueSource.java
@@ -23,7 +23,6 @@ import org.apache.lucene.index.IndexReader.ReaderContext;
import org.apache.lucene.search.function.DocValues;
import java.io.IOException;
-import java.io.Serializable;
/**
* Expert: source of values for basic function queries.
@@ -37,7 +36,7 @@ import java.io.Serializable;
*
*
*/
-public abstract class ValueSource implements Serializable {
+public abstract class ValueSource {
/**
* Return the DocValues used by the function query.
diff --git a/lucene/src/java/org/apache/lucene/search/payloads/PayloadFunction.java b/lucene/src/java/org/apache/lucene/search/payloads/PayloadFunction.java
index f4c34c2ca7e..b6c60350992 100644
--- a/lucene/src/java/org/apache/lucene/search/payloads/PayloadFunction.java
+++ b/lucene/src/java/org/apache/lucene/search/payloads/PayloadFunction.java
@@ -16,7 +16,6 @@ package org.apache.lucene.search.payloads;
* limitations under the License.
*/
-import java.io.Serializable;
import org.apache.lucene.search.Explanation;
/**
@@ -29,7 +28,7 @@ import org.apache.lucene.search.Explanation;
* change
*
**/
-public abstract class PayloadFunction implements Serializable {
+public abstract class PayloadFunction {
/**
* Calculate the score up to this point for this doc and field
diff --git a/lucene/src/java/org/apache/lucene/store/RAMDirectory.java b/lucene/src/java/org/apache/lucene/store/RAMDirectory.java
index e7ed3044fb9..9d07160a7b2 100644
--- a/lucene/src/java/org/apache/lucene/store/RAMDirectory.java
+++ b/lucene/src/java/org/apache/lucene/store/RAMDirectory.java
@@ -19,7 +19,6 @@ package org.apache.lucene.store;
import java.io.IOException;
import java.io.FileNotFoundException;
-import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
@@ -35,10 +34,7 @@ import org.apache.lucene.util.ThreadInterruptedException;
* implementation is by default the {@link SingleInstanceLockFactory}
* but can be changed with {@link #setLockFactory}.
*/
-public class RAMDirectory extends Directory implements Serializable {
-
- private static final long serialVersionUID = 1l;
-
+public class RAMDirectory extends Directory {
protected final Map<String,RAMFile> fileMap = new ConcurrentHashMap<String,RAMFile>();
protected final AtomicLong sizeInBytes = new AtomicLong();
diff --git a/lucene/src/java/org/apache/lucene/store/RAMFile.java b/lucene/src/java/org/apache/lucene/store/RAMFile.java
index 36306725cc1..123f800fba8 100644
--- a/lucene/src/java/org/apache/lucene/store/RAMFile.java
+++ b/lucene/src/java/org/apache/lucene/store/RAMFile.java
@@ -18,13 +18,9 @@ package org.apache.lucene.store;
*/
import java.util.ArrayList;
-import java.io.Serializable;
/** @lucene.internal */
-public class RAMFile implements Serializable {
-
- private static final long serialVersionUID = 1l;
-
+public class RAMFile {
protected ArrayList<byte[]> buffers = new ArrayList<byte[]>();
long length;
RAMDirectory directory;
diff --git a/lucene/src/java/org/apache/lucene/util/AttributeImpl.java b/lucene/src/java/org/apache/lucene/util/AttributeImpl.java
index d22491bf2c6..7d713358204 100644
--- a/lucene/src/java/org/apache/lucene/util/AttributeImpl.java
+++ b/lucene/src/java/org/apache/lucene/util/AttributeImpl.java
@@ -17,7 +17,6 @@ package org.apache.lucene.util;
* limitations under the License.
*/
-import java.io.Serializable;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.lang.ref.WeakReference;
@@ -30,7 +29,7 @@ import java.util.LinkedList;
* Attributes are used to add data in a dynamic, yet type-safe way to a source
* of usually streamed objects, e. g. a {@link org.apache.lucene.analysis.TokenStream}.
*/
-public abstract class AttributeImpl implements Cloneable, Serializable, Attribute {
+public abstract class AttributeImpl implements Cloneable, Attribute {
/**
* Clears the values in this AttributeImpl and resets it to its
* default value. If this implementation implements more than one Attribute interface
diff --git a/lucene/src/java/org/apache/lucene/util/BytesRef.java b/lucene/src/java/org/apache/lucene/util/BytesRef.java
index a90b6fb682d..6ad185f4ffa 100644
--- a/lucene/src/java/org/apache/lucene/util/BytesRef.java
+++ b/lucene/src/java/org/apache/lucene/util/BytesRef.java
@@ -21,14 +21,13 @@ import java.util.Comparator;
import java.io.UnsupportedEncodingException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
-import java.io.Externalizable;
import java.io.IOException;
/** Represents byte[], as a slice (offset + length) into an
* existing byte[].
*
* @lucene.experimental */
-public final class BytesRef implements Comparable<BytesRef>, Externalizable {
+public final class BytesRef implements Comparable<BytesRef> {
static final int HASH_PRIME = 31;
public static final byte[] EMPTY_BYTES = new byte[0];
@@ -365,25 +364,4 @@ public final class BytesRef implements Comparable<BytesRef>, Externalizable {
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;
- }
- }
}
diff --git a/lucene/src/java/org/apache/lucene/util/MapBackedSet.java b/lucene/src/java/org/apache/lucene/util/MapBackedSet.java
index 9db05ec86ba..d6c6567b778 100644
--- a/lucene/src/java/org/apache/lucene/util/MapBackedSet.java
+++ b/lucene/src/java/org/apache/lucene/util/MapBackedSet.java
@@ -17,7 +17,6 @@ package org.apache.lucene.util;
* limitations under the License.
*/
-import java.io.Serializable;
import java.util.AbstractSet;
import java.util.Iterator;
import java.util.Map;
@@ -28,10 +27,7 @@ import java.util.Map;
*
* @lucene.internal
*/
-public final class MapBackedSet<E> extends AbstractSet<E> implements Serializable {
-
- private static final long serialVersionUID = -6761513279741915432L;
-
+public final class MapBackedSet<E> extends AbstractSet<E> {
private final Map<E, Boolean> map;
/**
diff --git a/lucene/src/java/org/apache/lucene/util/OpenBitSet.java b/lucene/src/java/org/apache/lucene/util/OpenBitSet.java
index 9815ad7dec0..8e093b70f4f 100644
--- a/lucene/src/java/org/apache/lucene/util/OpenBitSet.java
+++ b/lucene/src/java/org/apache/lucene/util/OpenBitSet.java
@@ -18,7 +18,6 @@
package org.apache.lucene.util;
import java.util.Arrays;
-import java.io.Serializable;
import org.apache.lucene.search.DocIdSet;
import org.apache.lucene.search.DocIdSetIterator;
@@ -75,7 +74,7 @@ Test system: AMD Opteron, 64 bit linux, Sun Java 1.5_06 -server -Xbatch -Xmx64M
</table>
*/
-public class OpenBitSet extends DocIdSet implements Bits, Cloneable, Serializable {
+public class OpenBitSet extends DocIdSet implements Bits, Cloneable {
protected long[] bits;
protected int wlen; // number of words (elements) used in the array
diff --git a/lucene/src/java/org/apache/lucene/util/automaton/Automaton.java b/lucene/src/java/org/apache/lucene/util/automaton/Automaton.java
index d4f0f229ba4..4311ece1032 100644
--- a/lucene/src/java/org/apache/lucene/util/automaton/Automaton.java
+++ b/lucene/src/java/org/apache/lucene/util/automaton/Automaton.java
@@ -29,7 +29,6 @@
package org.apache.lucene.util.automaton;
-import java.io.Serializable;
import java.util.Arrays;
import java.util.BitSet;
import java.util.Collection;
@@ -75,7 +74,7 @@ import org.apache.lucene.util.RamUsageEstimator;
* </p>
* @lucene.experimental
*/
-public class Automaton implements Serializable, Cloneable {
+public class Automaton implements Cloneable {
/**
* Minimize using Hopcroft's O(n log n) algorithm. This is regarded as one of
diff --git a/lucene/src/java/org/apache/lucene/util/automaton/RunAutomaton.java b/lucene/src/java/org/apache/lucene/util/automaton/RunAutomaton.java
index eb20f9be7c3..2d9c0d0a72d 100644
--- a/lucene/src/java/org/apache/lucene/util/automaton/RunAutomaton.java
+++ b/lucene/src/java/org/apache/lucene/util/automaton/RunAutomaton.java
@@ -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;
diff --git a/lucene/src/java/org/apache/lucene/util/automaton/State.java b/lucene/src/java/org/apache/lucene/util/automaton/State.java
index 6aa04e51d96..486452fd347 100644
--- a/lucene/src/java/org/apache/lucene/util/automaton/State.java
+++ b/lucene/src/java/org/apache/lucene/util/automaton/State.java
@@ -31,7 +31,6 @@ package org.apache.lucene.util.automaton;
import org.apache.lucene.util.ArrayUtil;
import org.apache.lucene.util.RamUsageEstimator;
-import java.io.Serializable;
import java.util.Collection;
import java.util.Comparator;
import java.util.Iterator;
@@ -41,7 +40,7 @@ import java.util.Iterator;
*
* @lucene.experimental
*/
-public class State implements Serializable, Comparable<State> {
+public class State implements Comparable<State> {
boolean accept;
public Transition[] transitionsArray;
diff --git a/lucene/src/java/org/apache/lucene/util/automaton/Transition.java b/lucene/src/java/org/apache/lucene/util/automaton/Transition.java
index 8cdfe76098a..d03bcbc69ba 100644
--- a/lucene/src/java/org/apache/lucene/util/automaton/Transition.java
+++ b/lucene/src/java/org/apache/lucene/util/automaton/Transition.java
@@ -29,7 +29,6 @@
package org.apache.lucene.util.automaton;
-import java.io.Serializable;
import java.util.Comparator;
/**
@@ -40,7 +39,7 @@ import java.util.Comparator;
*
* @lucene.experimental
*/
-public class Transition implements Serializable, Cloneable {
+public class Transition implements Cloneable {
/*
* CLASS INVARIANT: min<=max
diff --git a/lucene/src/test-framework/org/apache/lucene/search/QueryUtils.java b/lucene/src/test-framework/org/apache/lucene/search/QueryUtils.java
index e84b2f9a8b9..483106d9fef 100644
--- a/lucene/src/test-framework/org/apache/lucene/search/QueryUtils.java
+++ b/lucene/src/test-framework/org/apache/lucene/search/QueryUtils.java
@@ -1,10 +1,6 @@
package org.apache.lucene.search;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
import java.util.Random;
import java.lang.reflect.Method;
@@ -102,7 +98,6 @@ public class QueryUtils {
* @see #checkFirstSkipTo
* @see #checkSkipTo
* @see #checkExplanations
- * @see #checkSerialization
* @see #checkEqual
*/
public static void check(Random random, Query q1, IndexSearcher s) {
@@ -124,7 +119,6 @@ public class QueryUtils {
wrapped.close();
}
checkExplanations(q1,s);
- checkSerialization(q1,s);
Query q2 = (Query)q1.clone();
checkEqual(s.rewrite(q1),
@@ -204,31 +198,6 @@ public class QueryUtils {
r.close();
return d;
}
-
-
- /** check that the query weight is serializable.
- * @throws IOException if serialization check fail.
- */
- private static void checkSerialization(Query q, IndexSearcher s) throws IOException {
- Weight w = q.weight(s);
- try {
- ByteArrayOutputStream bos = new ByteArrayOutputStream();
- ObjectOutputStream oos = new ObjectOutputStream(bos);
- oos.writeObject(w);
- oos.close();
- ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(bos.toByteArray()));
- ois.readObject();
- ois.close();
-
- //skip equals() test for now - most weights don't override equals() and we won't add this just for the tests.
- //TestCase.assertEquals("writeObject(w) != w. ("+w+")",w2,w);
-
- } catch (Exception e) {
- IOException e2 = new IOException("Serialization failed for "+w);
- e2.initCause(e);
- throw e2;
- }
- }
/** alternate scorer skipTo(),skipTo(),next(),next(),skipTo(),skipTo(), etc
* and ensure a hitcollector receives same docs and scores
diff --git a/lucene/src/test/org/apache/lucene/search/TestCustomSearcherSort.java b/lucene/src/test/org/apache/lucene/search/TestCustomSearcherSort.java
index 08781570e59..7e2982cac2e 100644
--- a/lucene/src/test/org/apache/lucene/search/TestCustomSearcherSort.java
+++ b/lucene/src/test/org/apache/lucene/search/TestCustomSearcherSort.java
@@ -17,7 +17,6 @@ package org.apache.lucene.search;
*/
import java.io.IOException;
-import java.io.Serializable;
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.Map;
@@ -34,7 +33,7 @@ import org.apache.lucene.store.Directory;
import org.apache.lucene.util.LuceneTestCase;
/** Unit test for sorting code. */
-public class TestCustomSearcherSort extends LuceneTestCase implements Serializable {
+public class TestCustomSearcherSort extends LuceneTestCase {
private Directory index = null;
private IndexReader reader;
diff --git a/lucene/src/test/org/apache/lucene/search/TestSort.java b/lucene/src/test/org/apache/lucene/search/TestSort.java
index 39d2f170b63..746a70dc471 100644
--- a/lucene/src/test/org/apache/lucene/search/TestSort.java
+++ b/lucene/src/test/org/apache/lucene/search/TestSort.java
@@ -18,7 +18,6 @@ package org.apache.lucene.search;
*/
import java.io.IOException;
-import java.io.Serializable;
import java.text.Collator;
import java.util.ArrayList;
import java.util.BitSet;
@@ -65,7 +64,7 @@ import org.apache.lucene.util._TestUtil;
* @since lucene 1.4
*/
-public class TestSort extends LuceneTestCase implements Serializable {
+public class TestSort extends LuceneTestCase {
private static final int NUM_STRINGS = 6000 * RANDOM_MULTIPLIER;
private IndexSearcher full;
diff --git a/lucene/src/test/org/apache/lucene/store/TestRAMDirectory.java b/lucene/src/test/org/apache/lucene/store/TestRAMDirectory.java
index 94f71aea46e..eb6901dc5bf 100644
--- a/lucene/src/test/org/apache/lucene/store/TestRAMDirectory.java
+++ b/lucene/src/test/org/apache/lucene/store/TestRAMDirectory.java
@@ -139,18 +139,6 @@ public class TestRAMDirectory extends LuceneTestCase {
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
diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/ByteVector.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/ByteVector.java
index 64768d435c7..e8ad2d6e269 100644
--- a/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/ByteVector.java
+++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/ByteVector.java
@@ -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
diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/CharVector.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/CharVector.java
index 373935ab6bc..15a7aae7d10 100644
--- a/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/CharVector.java
+++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/CharVector.java
@@ -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
diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/Hyphen.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/Hyphen.java
index 7ecbdf384b8..151c37fb92c 100644
--- a/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/Hyphen.java
+++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/Hyphen.java
@@ -17,8 +17,6 @@
package org.apache.lucene.analysis.compound.hyphenation;
-import java.io.Serializable;
-
/**
* This class represents a hyphen. A 'full' hyphen is made of 3 parts: the
* pre-break text, post-break text and no-break. If no line-break is generated
@@ -32,7 +30,7 @@ import java.io.Serializable;
* This class has been taken from the Apache FOP project (http://xmlgraphics.apache.org/fop/). They have been slightly modified.
*/
-public class Hyphen implements Serializable {
+public class Hyphen {
public String preBreak;
public String noBreak;
diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/HyphenationTree.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/HyphenationTree.java
index c61a8d06d1b..810e808503c 100644
--- a/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/HyphenationTree.java
+++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/HyphenationTree.java
@@ -18,7 +18,6 @@
package org.apache.lucene.analysis.compound.hyphenation;
import java.io.File;
-import java.io.Serializable;
import java.net.MalformedURLException;
import java.util.ArrayList;
import java.util.HashMap;
@@ -31,10 +30,7 @@ import org.xml.sax.InputSource;
*
* This class has been taken from the Apache FOP project (http://xmlgraphics.apache.org/fop/). They have been slightly modified.
*/
-public class HyphenationTree extends TernaryTree implements PatternConsumer,
- Serializable {
-
- private static final long serialVersionUID = -7842107987915665573L;
+public class HyphenationTree extends TernaryTree implements PatternConsumer {
/**
* value space: stores the interletter values
diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/TernaryTree.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/TernaryTree.java
index 61a68f7ac72..178fcb44eee 100644
--- a/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/TernaryTree.java
+++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/TernaryTree.java
@@ -19,7 +19,6 @@ package org.apache.lucene.analysis.compound.hyphenation;
import java.util.Enumeration;
import java.util.Stack;
-import java.io.Serializable;
/**
* <h2>Ternary Search Tree.</h2>
@@ -63,7 +62,7 @@ import java.io.Serializable;
* This class has been taken from the Apache FOP project (http://xmlgraphics.apache.org/fop/). They have been slightly modified.
*/
-public class TernaryTree implements Cloneable, Serializable {
+public class TernaryTree implements Cloneable {
/**
* We use 4 arrays to represent a node. I guess I should have created a proper
diff --git a/modules/analysis/icu/src/java/org/apache/lucene/analysis/icu/tokenattributes/ScriptAttributeImpl.java b/modules/analysis/icu/src/java/org/apache/lucene/analysis/icu/tokenattributes/ScriptAttributeImpl.java
index 3a54af94b58..1a14647e306 100644
--- a/modules/analysis/icu/src/java/org/apache/lucene/analysis/icu/tokenattributes/ScriptAttributeImpl.java
+++ b/modules/analysis/icu/src/java/org/apache/lucene/analysis/icu/tokenattributes/ScriptAttributeImpl.java
@@ -17,8 +17,6 @@ package org.apache.lucene.analysis.icu.tokenattributes;
* limitations under the License.
*/
-import java.io.Serializable;
-
import org.apache.lucene.util.AttributeImpl;
import org.apache.lucene.util.AttributeReflector;
@@ -29,7 +27,7 @@ import com.ibm.icu.lang.UScript;
* as an integer.
* @lucene.experimental
*/
-public class ScriptAttributeImpl extends AttributeImpl implements ScriptAttribute, Cloneable, Serializable {
+public class ScriptAttributeImpl extends AttributeImpl implements ScriptAttribute, Cloneable {
private int code = UScript.COMMON;
public int getCode() {