Files
Nikolay Chashnikovandintellij-monorepo-bot 6ff53a44d7 [java] tests: migrate NullityInferrerTest to use modern annotations with 'TYPE_USE' target
We won't need to have the 'jetbrains-annotations-java5' library in the monorepo after migrating all modules to Java 8 (IJPL-160046). Also, it makes sense to test the behavior for the modern variant of the annotations anyway.

IJ-MR-172675

GitOrigin-RevId: c263316db155756cb07c6d439d9f575dfdb096a6
2025-08-18 17:31:55 +00:00

13 lines
239 B
Java

import org.jetbrains.annotations.NotNull;
class Test {
public @NotNull String noNull(@NotNull String text) {
assert text != null;
return "";
}
private void foo() {
@NotNull String str = "";
assert str != null;
}
}