Skip to content

Commit 62556a4

Browse files
piotrtomiakintellij-monorepo-bot
authored andcommitted
WEB-61150 JS: use char sequences where possible to save on memory allocations during indexing - fix formatting.
GitOrigin-RevId: 6e0ac9a92bad8899d6a8610b2e8057b3dbc8b187
1 parent a26b408 commit 62556a4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

platform/util/base/src/com/intellij/util/text/CharSequenceSubSequence.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ public void getChars(int start, int end, char @NotNull [] dest, int destPos) {
7474
}
7575

7676
private transient int hash;
77+
7778
@Override
7879
public int hashCode() {
7980
int h = hash;
@@ -87,8 +88,9 @@ public int hashCode() {
8788
public boolean equals(Object obj) {
8889
if (obj == this) return true;
8990
if (obj instanceof CharSequence) {
90-
return StringUtilRt.equal(this, (CharSequence) obj, true);
91-
} else {
91+
return StringUtilRt.equal(this, (CharSequence)obj, true);
92+
}
93+
else {
9294
return false;
9395
}
9496
}

0 commit comments

Comments
 (0)