From 6865b04a4c1ad2fefec2e03e4afc1ec6345c72fa Mon Sep 17 00:00:00 2001 From: coehlrich Date: Mon, 11 Sep 2023 13:33:09 +1200 Subject: [PATCH 1/2] Make containsKey return true if the key is present and the value is null --- .../decompiler/util/collections/NullableConcurrentHashMap.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/jetbrains/java/decompiler/util/collections/NullableConcurrentHashMap.java b/src/org/jetbrains/java/decompiler/util/collections/NullableConcurrentHashMap.java index 9ea6289b9c..e80e6697e2 100644 --- a/src/org/jetbrains/java/decompiler/util/collections/NullableConcurrentHashMap.java +++ b/src/org/jetbrains/java/decompiler/util/collections/NullableConcurrentHashMap.java @@ -44,7 +44,7 @@ public boolean containsKey(Object key) { key = NULL_KEY; } - return super.containsKey(key); + return super.get(key) != null; } @Override From 93d88fa48c9e980f734163d3ab29aa87a0ad7385 Mon Sep 17 00:00:00 2001 From: coehlrich Date: Mon, 11 Sep 2023 13:50:35 +1200 Subject: [PATCH 2/2] Update TestGenericsInvocUnchecked test --- testData/results/pkg/TestGenericsInvocUnchecked.dec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testData/results/pkg/TestGenericsInvocUnchecked.dec b/testData/results/pkg/TestGenericsInvocUnchecked.dec index e262e87fae..6ed0c9b050 100644 --- a/testData/results/pkg/TestGenericsInvocUnchecked.dec +++ b/testData/results/pkg/TestGenericsInvocUnchecked.dec @@ -2,7 +2,7 @@ package pkg; public class TestGenericsInvocUnchecked { public void test(int i, TestGenericsInvocUnchecked other) { - new TestGenericsInvocUnchecked.Inner().testInner(i, this, (TestGenericsInvocUnchecked)other);// 11 + new TestGenericsInvocUnchecked.Inner().testInner(i, this, other);// 11 }// 12 public void test1(Class c, String s) {