From f7923d46b448d1286649799bc43b209618d6b04d Mon Sep 17 00:00:00 2001 From: Manu Sridharan Date: Sat, 7 Oct 2023 17:07:46 -0700 Subject: [PATCH] Ignore another method for code coverage --- .../main/java/com/uber/nullaway/dataflow/AccessPath.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/nullaway/src/main/java/com/uber/nullaway/dataflow/AccessPath.java b/nullaway/src/main/java/com/uber/nullaway/dataflow/AccessPath.java index ba440cfa38..d4fa6772c7 100644 --- a/nullaway/src/main/java/com/uber/nullaway/dataflow/AccessPath.java +++ b/nullaway/src/main/java/com/uber/nullaway/dataflow/AccessPath.java @@ -618,7 +618,14 @@ public int hashCode() { return Long.hashCode(this.key); } + /** + * We ignore this method for code coverage since there is non-determinism somewhere deep in a + * Map implementation such that, depending on how AccessPaths get bucketed in the Map (which + * depends on non-deterministic hash codes), sometimes this method is called and sometimes it is + * not. + */ @Override + @JacocoIgnoreGenerated public boolean equals(Object obj) { if (obj instanceof NumericMapKey) { return this.key == ((NumericMapKey) obj).key;