Skip to main content
diff options
authorCarsten Hammer2020-12-06 16:29:24 +0000
committerMickael Istria2022-03-17 17:50:16 +0000
commitbfbc401841d36d3505d2b1e3aa63bc3c8449b409 (patch)
parent01ef7d3bf1afee97848cbc0db42a1fc01cfea140 (diff)
Bug: calls equals(Object) on StringBuilder and StringHEADI20220318-0220I20220317-1800master
Call to StringBuilder.equals(String) in org.apache.lucene.demo.html.HTMLParser.addText(String) This method calls equals(Object) on two references of different class types and analysis suggests they will be to objects of different classes at runtime. Further, examination of the equals methods that would be invoked suggest that either this call will always return false, or else the equals method is not be symmetric (which is a property required by the contract for equals in class Object). Rank: Scariest (1), confidence: High Pattern: EC_UNRELATED_TYPES Type: EC, Category: CORRECTNESS (Correctness) Change-Id: Iba0ddd0564ceee8cf1c176aba580c279689d1068 Signed-off-by: Carsten Hammer <> Reviewed-on: Tested-by: Platform Bot <> Reviewed-by: Mickael Istria <>
1 files changed, 1 insertions, 1 deletions
diff --git a/ b/
index f6ad4b73a..1b62e11dd 100644
--- a/
+++ b/
@@ -126,7 +126,7 @@ InterruptedException {
if (!inHeading || summary.length() > 0) {
- if (!titleComplete && !title.equals("")) { // finished title //$NON-NLS-1$
+ if (!titleComplete && !title.toString().isEmpty()) { // finished title
synchronized(this) {
titleComplete = true; // tell waiting threads

Back to the top