diff --git a/lucene/core/src/java/org/apache/lucene/index/IndexWriterConfig.java b/lucene/core/src/java/org/apache/lucene/index/IndexWriterConfig.java index 26e7e3dbb6af..eaef6c68fd0c 100644 --- a/lucene/core/src/java/org/apache/lucene/index/IndexWriterConfig.java +++ b/lucene/core/src/java/org/apache/lucene/index/IndexWriterConfig.java @@ -475,7 +475,9 @@ public IndexWriterConfig setIndexSort(Sort sort) { @Override public String toString() { - StringBuilder sb = new StringBuilder(super.toString()); + String superString = super.toString(); + StringBuilder sb = new StringBuilder(superString.length() + 512); + sb.append(superString); sb.append("writer=").append(writer.get()).append("\n"); return sb.toString(); }