Skip to content

Commit

Permalink
Disable check for equals when two objects collide (#11015)
Browse files Browse the repository at this point in the history
  • Loading branch information
JaroslavTulach authored Sep 10, 2024
1 parent 0b6aaee commit d7d56dd
Showing 1 changed file with 1 addition and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -217,22 +217,7 @@ static Object readIndirect(InputCache cache, PerMap map, Input in) throws IOExce
var inData = new PerInputImpl(cache, at);
var res = p.readWith(inData);
res = cache.resolveObject(res);
var prev = cache.putObjectAt(at, res);
if (prev != null) {
var bothObjectsAreTheSame = Objects.equals(res, prev);
var sb = new StringBuilder();
sb.append("Adding at ").append(at).append(" object:\n ");
dumpObject(sb, res);
sb.append("\nbut there already is:\n ");
dumpObject(sb, prev);
sb.append("\nare they equal: ").append(bothObjectsAreTheSame);
var ex = new IOException(sb.toString());
if (bothObjectsAreTheSame) {
PerUtils.LOG.warn(sb.toString(), ex);
} else {
throw raise(RuntimeException.class, ex);
}
}
cache.putObjectAt(at, res);
return res;
}

Expand Down

0 comments on commit d7d56dd

Please sign in to comment.