Steps to reproduce
Given following code:
```java
import org.awaitility.Awaitility;
import org.junit.jupiter.api.Test;
import java.util.Map;
import static org.assertj.core.api.Assertions.assertThat;
public class Example {
record MyObject(String a, String b) {}
static class Loader {
int i = 0;
public Map<String, MyObject> load() {
if (i == 0) {
i++;
return Map.of();
} else {
i++;
return Map.of("x", new MyObject("a", "b"));
}
}
}
@Test
public void runTest() {
Loader loader = new Loader();
Awaitility.await().untilAsserted(() ->
assertThat(loader.load().get("x"))
.isNotNull() // Intellij hints "Implicit isNotNull() assertion is covered by containsExactly()"
.extracting(MyObject::a, MyObject::b)
.containsExactly("a", "b"));
}
}
```
The above test runs correct, but IntelliJ hints that the "isNotNull" is not needed. Removing this line causes the test to fail.
Expected result (correct result): IntelliJ should not hint the "isNotNull" is not needed
Actual result (faulty result): IntelliJ hints that it is needed.
Environment:
IU-241.18034.62, JRE 17.0.11+1-b1207.24x64 JetBrains s.r.o., OS Linux(amd64) v5.15.0-113-generic, screens 1920.0x1080.0, 1920.0x1080.0
chrisly42
added the bug label 2024-07-13 16:05:02 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Steps to reproduce
Given following code:
The above test runs correct, but IntelliJ hints that the "isNotNull" is not needed. Removing this line causes the test to fail.
Expected result (correct result): IntelliJ should not hint the "isNotNull" is not needed
Actual result (faulty result): IntelliJ hints that it is needed.
Environment:
IU-241.18034.62, JRE 17.0.11+1-b1207.24x64 JetBrains s.r.o., OS Linux(amd64) v5.15.0-113-generic, screens 1920.0x1080.0, 1920.0x1080.0
Thanks for the thorough report. I will fix it as soon as I have the time.