From e9161ac36535b27b439da0dfd2c2338b892882ea Mon Sep 17 00:00:00 2001 From: Scott Ganyo Date: Thu, 11 Oct 2001 15:14:14 +0000 Subject: [PATCH] Fix NullPointerException in clone() method when the Term is null. git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@149608 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/lucene/index/SegmentTermEnum.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/java/org/apache/lucene/index/SegmentTermEnum.java b/src/java/org/apache/lucene/index/SegmentTermEnum.java index e7722da0f17..ef8e234a9fb 100644 --- a/src/java/org/apache/lucene/index/SegmentTermEnum.java +++ b/src/java/org/apache/lucene/index/SegmentTermEnum.java @@ -88,7 +88,7 @@ final class SegmentTermEnum extends TermEnum implements Cloneable { clone.input = (InputStream)input.clone(); clone.termInfo = new TermInfo(termInfo); - clone.growBuffer(term.text.length()); + if (term != null) clone.growBuffer(term.text.length()); return clone; }