mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-06 06:21:16 +07:00
EA-125372 - NPE: GeneratedParserUtilBase$ErrorState.appendExpected
This commit is contained in:
@@ -959,7 +959,7 @@ public class GeneratedParserUtilBase {
|
||||
int count = 0;
|
||||
loop: for (Variant variant : list) {
|
||||
if (position == variant.position) {
|
||||
String text = variant.object.toString();
|
||||
String text = String.valueOf(variant.object);
|
||||
long hash = StringHash.calc(text);
|
||||
for (int i=0; i<count; i++) {
|
||||
if (hashes[i] == hash) continue loop;
|
||||
@@ -1084,26 +1084,6 @@ public class GeneratedParserUtilBase {
|
||||
public String toString() {
|
||||
return "<" + position + ", " + object + ">";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
|
||||
Variant variant = (Variant)o;
|
||||
|
||||
if (position != variant.position) return false;
|
||||
if (!this.object.equals(variant.object)) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = position;
|
||||
result = 31 * result + object.hashCode();
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
private static class Hooks<T> {
|
||||
|
||||
Reference in New Issue
Block a user