mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 23:39:39 +07:00
22 lines
664 B
Java
22 lines
664 B
Java
import org.jetbrains.annotations.Contract;
|
|
import org.jetbrains.annotations.Nullable;
|
|
|
|
class TestCase {
|
|
|
|
private void countWordsWarning() {
|
|
// no warnings should be here
|
|
String s = normalizeSpace(unknown()).trim();
|
|
String s3 = normalizeSpaceInverted(unknown()).trim();
|
|
|
|
String s4 = normalizeSpace(null).<warning descr="Method invocation 'trim' will produce 'NullPointerException'">trim</warning>();
|
|
}
|
|
|
|
public static native String unknown();
|
|
|
|
@Contract("null->null")
|
|
public static native String normalizeSpace(@Nullable String str);
|
|
|
|
@Contract("!null->!null; _->null")
|
|
public static native String normalizeSpaceInverted(String str);
|
|
|
|
} |