Skip to content

Commit 6efe172

Browse files
committed
rename to avoid confusion with Object.equals()
1 parent 2c2ec61 commit 6efe172

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

opengrok-indexer/src/main/java/org/opengrok/indexer/search/context/LineMatcher.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919

2020
/*
21-
* Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
21+
* Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved.
2222
* Portions Copyright (c) 2018, 2020, Chris Fraire <[email protected]>.
2323
*/
2424
package org.opengrok.indexer.search.context;
@@ -56,7 +56,7 @@ public abstract class LineMatcher {
5656
* the check will return true if the only difference between the strings
5757
* is difference in case.
5858
*/
59-
boolean equal(String s1, String s2) {
59+
boolean equalStrings(String s1, String s2) {
6060
return compareStrings(s1, s2) == 0;
6161
}
6262

opengrok-indexer/src/main/java/org/opengrok/indexer/search/context/PhraseMatcher.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class PhraseMatcher extends LineMatcher {
3737

3838
@Override
3939
public int match(String token) {
40-
if (equal(token, phraseTerms[cur])) {
40+
if (equalStrings(token, phraseTerms[cur])) {
4141
if (cur < phraseTerms.length - 1) {
4242
cur++;
4343
return WAIT; //matching.
@@ -46,7 +46,7 @@ public int match(String token) {
4646
return MATCHED; //matched!
4747
} else if (cur > 0) {
4848
cur = 0;
49-
if (equal(token, phraseTerms[cur])) {
49+
if (equalStrings(token, phraseTerms[cur])) {
5050
cur++;
5151
return WAIT; //matching.
5252
}

0 commit comments

Comments
 (0)