Apache Lucene open-source search software
LUCENE-1462: Make TermVectorOffsetInfo serializable
Grant Ingersollffa2ee2203dc
diff --git a/src/java/org/apache/lucene/index/TermVectorOffsetInfo.java b/src/java/org/apache/lucene/index/TermVectorOffsetInfo.javaindex c86e8b3765e..76ca38757f2 100644--- a/src/java/org/apache/lucene/index/TermVectorOffsetInfo.java+++ b/src/java/org/apache/lucene/index/TermVectorOffsetInfo.java@@ -1,5 +1,7 @@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@@ -22,11 +24,11 @@ package org.apache.lucene.index;* 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 {+public class TermVectorOffsetInfo implements Serializable {/*** Convenience declaration when creating a {@link org.apache.lucene.index.TermPositionVector} that stores only position information.*/- public static final TermVectorOffsetInfo[] EMPTY_OFFSET_INFO = new TermVectorOffsetInfo[0];+ public transient static final TermVectorOffsetInfo[] EMPTY_OFFSET_INFO = new TermVectorOffsetInfo[0];private int startOffset;private int endOffset;