Skip to content

Apache Lucene open-source search software

LUCENE-6586: fix typo causing possible wrong value for substCount

Michael McCandless8e4b427926a8
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index a6520691b79..c6efbcef195 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -182,6 +182,9 @@ Bug fixes
* LUCENE-6614: Improve partition detection in IOUtils#spins() so it
works with NVMe drives. (Uwe Schindler, Mike McCandless)
+* LUCENE-6586: Fix typo in GermanStemmer, causing possible wrong value
+ for substCount. (Christoph Kaser via Mike McCandless)
+
Changes in Runtime Behavior
* LUCENE-6501: The subreader structure in ParallelCompositeReader
diff --git a/lucene/analysis/common/src/java/org/apache/lucene/analysis/de/GermanStemmer.java b/lucene/analysis/common/src/java/org/apache/lucene/analysis/de/GermanStemmer.java
index 36f6b9507bb..6b2ae88607b 100644
--- a/lucene/analysis/common/src/java/org/apache/lucene/analysis/de/GermanStemmer.java
+++ b/lucene/analysis/common/src/java/org/apache/lucene/analysis/de/GermanStemmer.java
@@ -200,7 +200,7 @@ public class GermanStemmer
{
buffer.setCharAt( c, '$' );
buffer.delete( c + 1, c + 3 );
- substCount =+ 2;
+ substCount += 2;
}
else if ( buffer.charAt( c ) == 'c' && buffer.charAt( c + 1 ) == 'h' ) {
buffer.setCharAt( c, '§' );