Index: modules/analysis/icu/src/java/org/apache/lucene/analysis/icu/tokenattributes/ScriptAttributeImpl.java =================================================================== --- modules/analysis/icu/src/java/org/apache/lucene/analysis/icu/tokenattributes/ScriptAttributeImpl.java (revision 1067678) +++ modules/analysis/icu/src/java/org/apache/lucene/analysis/icu/tokenattributes/ScriptAttributeImpl.java (working copy) @@ -17,8 +17,6 @@ * limitations under the License. */ -import java.io.Serializable; - import org.apache.lucene.util.AttributeImpl; import org.apache.lucene.util.AttributeReflector; @@ -29,7 +27,7 @@ * as an integer. * @lucene.experimental */ -public class ScriptAttributeImpl extends AttributeImpl implements ScriptAttribute, Cloneable, Serializable { +public class ScriptAttributeImpl extends AttributeImpl implements ScriptAttribute, Cloneable { private int code = UScript.COMMON; public int getCode() { Index: modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/CharVector.java =================================================================== --- modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/CharVector.java (revision 1067678) +++ modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/CharVector.java (working copy) @@ -17,15 +17,13 @@ package org.apache.lucene.analysis.compound.hyphenation; -import java.io.Serializable; - /** * This class implements a simple char vector with access to the underlying * array. * * This class has been taken from the Apache FOP project (http://xmlgraphics.apache.org/fop/). They have been slightly modified. */ -public class CharVector implements Cloneable, Serializable { +public class CharVector implements Cloneable { /** * Capacity increment size Index: modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/TernaryTree.java =================================================================== --- modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/TernaryTree.java (revision 1067678) +++ modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/TernaryTree.java (working copy) @@ -19,7 +19,6 @@ import java.util.Enumeration; import java.util.Stack; -import java.io.Serializable; /** *
b. Documents
Index: lucene/src/java/org/apache/lucene/search/TopDocs.java
===================================================================
--- lucene/src/java/org/apache/lucene/search/TopDocs.java (revision 1067678)
+++ lucene/src/java/org/apache/lucene/search/TopDocs.java (working copy)
@@ -20,7 +20,7 @@
/** Represents hits returned by {@link
* IndexSearcher#search(Query,Filter,int)} and {@link
* IndexSearcher#search(Query,int)}. */
-public class TopDocs implements java.io.Serializable {
+public class TopDocs {
/** The total number of hits for the query.
*/
public int totalHits;
Index: lucene/src/java/org/apache/lucene/search/Explanation.java
===================================================================
--- lucene/src/java/org/apache/lucene/search/Explanation.java (revision 1067678)
+++ lucene/src/java/org/apache/lucene/search/Explanation.java (working copy)
@@ -17,11 +17,10 @@
* limitations under the License.
*/
-import java.io.Serializable;
import java.util.ArrayList;
/** Expert: Describes the score computation for document and query. */
-public class Explanation implements java.io.Serializable {
+public class Explanation {
private float value; // the value of this node
private String description; // what it represents
private ArrayList
* @lucene.experimental
*/
-public class Automaton implements Serializable, Cloneable {
+public class Automaton implements Cloneable {
/**
* Minimize using Hopcroft's O(n log n) algorithm. This is regarded as one of
Index: lucene/src/java/org/apache/lucene/util/automaton/State.java
===================================================================
--- lucene/src/java/org/apache/lucene/util/automaton/State.java (revision 1067678)
+++ lucene/src/java/org/apache/lucene/util/automaton/State.java (working copy)
@@ -31,7 +31,6 @@
import org.apache.lucene.util.ArrayUtil;
import org.apache.lucene.util.RamUsageEstimator;
-import java.io.Serializable;
import java.util.Collection;
import java.util.Comparator;
import java.util.Iterator;
@@ -41,7 +40,7 @@
*
* @lucene.experimental
*/
-public class State implements Serializable, Comparable
The package org.apache.lucene.queryParser.nodes contains all the basic query nodes. The interface -that represents a query node is {@link org.apache.lucene.queryParser.core.nodes.QueryNode}. Every query node must be serializable. +that represents a query node is {@link org.apache.lucene.queryParser.core.nodes.QueryNode}.
{@link org.apache.lucene.queryParser.core.nodes.QueryNode}s are used by the text parser to create a syntax tree.
Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/FieldQueryNode.java
===================================================================
--- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/FieldQueryNode.java (revision 1067678)
+++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/FieldQueryNode.java (working copy)
@@ -28,8 +28,6 @@
public class FieldQueryNode extends QueryNodeImpl implements TextableQueryNode,
FieldableNode {
- private static final long serialVersionUID = 3634521145130758265L;
-
/**
* The term's field
*/
Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/BoostQueryNode.java
===================================================================
--- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/BoostQueryNode.java (revision 1067678)
+++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/BoostQueryNode.java (working copy)
@@ -34,8 +34,6 @@
*/
public class BoostQueryNode extends QueryNodeImpl {
- private static final long serialVersionUID = -3929082630855807593L;
-
private float value = 0;
/**
Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/ParametricQueryNode.java
===================================================================
--- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/ParametricQueryNode.java (revision 1067678)
+++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/ParametricQueryNode.java (working copy)
@@ -25,8 +25,6 @@
*/
public class ParametricQueryNode extends FieldQueryNode {
- private static final long serialVersionUID = -5770038129741218116L;
-
private CompareOperator operator;
public enum CompareOperator {
Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/FuzzyQueryNode.java
===================================================================
--- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/FuzzyQueryNode.java (revision 1067678)
+++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/FuzzyQueryNode.java (working copy)
@@ -25,8 +25,6 @@
*/
public class FuzzyQueryNode extends FieldQueryNode {
- private static final long serialVersionUID = -1794537213032589441L;
-
private float similarity;
private int prefixLength;
Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/AnyQueryNode.java
===================================================================
--- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/AnyQueryNode.java (revision 1067678)
+++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/AnyQueryNode.java (working copy)
@@ -26,8 +26,6 @@
* nodes.
*/
public class AnyQueryNode extends AndQueryNode {
- private static final long serialVersionUID = 1000791433562954187L;
-
private CharSequence field = null;
private int minimumMatchingmElements = 0;
Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/OpaqueQueryNode.java
===================================================================
--- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/OpaqueQueryNode.java (revision 1067678)
+++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/OpaqueQueryNode.java (working copy)
@@ -26,8 +26,6 @@
*/
public class OpaqueQueryNode extends QueryNodeImpl {
- private static final long serialVersionUID = 0L;
-
private CharSequence schema = null;
private CharSequence value = null;
Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/GroupQueryNode.java
===================================================================
--- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/GroupQueryNode.java (revision 1067678)
+++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/GroupQueryNode.java (working copy)
@@ -34,8 +34,6 @@
*/
public class GroupQueryNode extends QueryNodeImpl {
- private static final long serialVersionUID = -9204673493869114999L;
-
/**
* This QueryNode is used to identify parenthesis on the original query string
*/
Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/PathQueryNode.java
===================================================================
--- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/PathQueryNode.java (revision 1067678)
+++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/PathQueryNode.java (working copy)
@@ -41,8 +41,6 @@
*/
public class PathQueryNode extends QueryNodeImpl {
- private static final long serialVersionUID = -8325921322405804789L;
-
public static class QueryText implements Cloneable {
CharSequence value = null;
/**
Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/ModifierQueryNode.java
===================================================================
--- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/ModifierQueryNode.java (revision 1067678)
+++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/ModifierQueryNode.java (working copy)
@@ -36,8 +36,6 @@
*/
public class ModifierQueryNode extends QueryNodeImpl {
- private static final long serialVersionUID = -391209837953928169L;
-
public enum Modifier {
MOD_NONE, MOD_NOT, MOD_REQ;
Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/MatchAllDocsQueryNode.java
===================================================================
--- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/MatchAllDocsQueryNode.java (revision 1067678)
+++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/MatchAllDocsQueryNode.java (working copy)
@@ -25,8 +25,6 @@
*/
public class MatchAllDocsQueryNode extends QueryNodeImpl {
- private static final long serialVersionUID = -7050381275423477809L;
-
public MatchAllDocsQueryNode() {
// empty constructor
}
Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/TokenizedPhraseQueryNode.java
===================================================================
--- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/TokenizedPhraseQueryNode.java (revision 1067678)
+++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/TokenizedPhraseQueryNode.java (working copy)
@@ -28,8 +28,6 @@
public class TokenizedPhraseQueryNode extends QueryNodeImpl implements
FieldableNode {
- private static final long serialVersionUID = -7185108320787917541L;
-
public TokenizedPhraseQueryNode() {
setLeaf(false);
allocate();
Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/QueryNodeImpl.java
===================================================================
--- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/QueryNodeImpl.java (revision 1067678)
+++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/QueryNodeImpl.java (working copy)
@@ -33,8 +33,6 @@
*/
public abstract class QueryNodeImpl implements QueryNode, Cloneable {
- private static final long serialVersionUID = 5569870883474845989L;
-
/* index default field */
// TODO remove PLAINTEXT_FIELD_NAME replacing it with configuration APIs
public static final String PLAINTEXT_FIELD_NAME = "_plain";
Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/MatchNoDocsQueryNode.java
===================================================================
--- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/MatchNoDocsQueryNode.java (revision 1067678)
+++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/MatchNoDocsQueryNode.java (working copy)
@@ -24,8 +24,6 @@
*/
public class MatchNoDocsQueryNode extends DeletedQueryNode {
- private static final long serialVersionUID = 8081805751679581497L;
-
public MatchNoDocsQueryNode() {
// empty constructor
}
Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/AndQueryNode.java
===================================================================
--- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/AndQueryNode.java (revision 1067678)
+++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/nodes/AndQueryNode.java (working copy)
@@ -27,8 +27,6 @@
*/
public class AndQueryNode extends BooleanQueryNode {
- private static final long serialVersionUID = 118496077529151825L;
-
/**
* @param clauses
* - the query nodes to be and'ed
Index: lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/QueryNodeException.java
===================================================================
--- lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/QueryNodeException.java (revision 1067678)
+++ lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/core/QueryNodeException.java (working copy)
@@ -42,8 +42,6 @@
*/
public class QueryNodeException extends Exception implements NLSException {
- private static final long serialVersionUID = -5962648855261624214L;
-
protected Message message = new MessageImpl(QueryParserMessages.EMPTY_MESSAGE);
public QueryNodeException(Message message) {
Index: lucene/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestSerialization.java
===================================================================
--- lucene/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestSerialization.java (revision 1067678)
+++ lucene/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestSerialization.java (working copy)
@@ -1,56 +0,0 @@
-package org.apache.lucene.store.instantiated;
-
-/**
- * Copyright 2006 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-import org.apache.lucene.store.Directory;
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.index.IndexWriter;
-import org.apache.lucene.index.IndexReader;
-import org.apache.lucene.analysis.MockAnalyzer;
-import org.apache.lucene.document.Document;
-import org.apache.lucene.document.Field;
-
-import java.io.ByteArrayOutputStream;
-import java.io.ObjectOutputStream;
-
-public class TestSerialization extends LuceneTestCase {
-
- public void test() throws Exception {
- Directory dir = newDirectory();
-
- IndexWriter iw = new IndexWriter(dir, newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer()));
- Document doc = new Document();
- doc.add(new Field("foo", "bar rab abr bra rba", Field.Store.NO, Field.Index.ANALYZED, Field.TermVector.WITH_POSITIONS_OFFSETS));
- doc.add(new Field("moo", "bar rab abr bra rba", Field.Store.YES, Field.Index.ANALYZED, Field.TermVector.WITH_POSITIONS_OFFSETS));
- iw.addDocument(doc);
- iw.close();
-
- IndexReader ir = IndexReader.open(dir, false);
- InstantiatedIndex ii = new InstantiatedIndex(ir);
- ir.close();
-
- ByteArrayOutputStream baos = new ByteArrayOutputStream(5000);
- ObjectOutputStream oos = new ObjectOutputStream(baos);
- oos.writeObject(ii);
- oos.close();
- baos.close();
- dir.close();
-
- }
-
-}
Index: lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/FieldSettings.java
===================================================================
--- lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/FieldSettings.java (revision 1067678)
+++ lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/FieldSettings.java (working copy)
@@ -3,7 +3,6 @@
import java.util.HashMap;
import java.util.Map;
import java.util.Collection;
-import java.io.Serializable;
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -25,7 +24,7 @@
/**
* Essentially a Mapint elements;
* implemented with arrays.
*/
- private static final class ArrayIntList implements Serializable {
+ private static final class ArrayIntList {
private int[] elements;
private int size = 0;
-
- private static final long serialVersionUID = 2282195016849084649L;
public ArrayIntList() {
this(10);
Index: lucene/contrib/queries/src/java/org/apache/lucene/search/FilterClause.java
===================================================================
--- lucene/contrib/queries/src/java/org/apache/lucene/search/FilterClause.java (revision 1067678)
+++ lucene/contrib/queries/src/java/org/apache/lucene/search/FilterClause.java (working copy)
@@ -26,7 +26,7 @@
* of queries.)
*/
-public class FilterClause implements java.io.Serializable
+public class FilterClause
{
Occur occur = null;
Filter filter = null;
Index: lucene/contrib/queries/src/java/org/apache/lucene/search/regex/RegexCapabilities.java
===================================================================
--- lucene/contrib/queries/src/java/org/apache/lucene/search/regex/RegexCapabilities.java (revision 1067678)
+++ lucene/contrib/queries/src/java/org/apache/lucene/search/regex/RegexCapabilities.java (working copy)
@@ -1,7 +1,5 @@
package org.apache.lucene.search.regex;
-import java.io.Serializable;
-
import org.apache.lucene.util.BytesRef;
/**
@@ -25,7 +23,7 @@
* Defines basic operations needed by {@link RegexQuery} for a regular
* expression implementation.
*/
-public interface RegexCapabilities extends Serializable {
+public interface RegexCapabilities {
/**
* Called by the constructor of {@link RegexTermsEnum} allowing
* implementations to cache a compiled version of the regular