mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-09 09:47:51 +07:00
GitOrigin-RevId: 7c9af4821b2fd7cb867dc98633e63e1eef9e8aac
19 lines
346 B
Java
19 lines
346 B
Java
package org.example;
|
|
|
|
import org.jetbrains.annotations.*;
|
|
|
|
class PrivateFieldPureMethod {
|
|
private @Nullable String myField;
|
|
|
|
void test() {
|
|
boolean b = myField != null;
|
|
if (isValid() && b) {
|
|
System.out.println(myField.trim());
|
|
}
|
|
}
|
|
|
|
@Contract(pure = true)
|
|
public boolean isValid() {
|
|
return Math.random() > 0.5;
|
|
}
|
|
} |