blob: 6f26a838e2df48eaf0f203390499fd1dab5470f7 [file]
package org.assertj.core.api;
import org.jetbrains.annotations.Nullable;
class Sample {
public void aMethod2(Integer someValue) {
Object object = methodWhichCanReturnNull(someValue);
Assertions.assertThat(object).isNotNull();
if (<warning descr="Condition 'object == null' is always 'false'">object == null</warning>) {}
}
@Nullable
private Object methodWhichCanReturnNull(Integer someValue) {
return someValue;
}
}
class Assertions {
public static ObjectAssert assertThat(Object actual) {
return new ObjectAssert(actual);
}
}
class ObjectAssert {
ObjectAssert(Object obj) {}
public ObjectAssert isNotNull() {
return this;
}
}