[java-analysis] PropertyUtil: NotNull annotations

GitOrigin-RevId: 6219506a1494f02cba391c08a5de650ef4e94814
This commit is contained in:
Tagir Valeev
2024-12-02 14:43:44 +00:00
committed by intellij-monorepo-bot
parent 0b7ca8a762
commit dc05d371fc
@@ -20,17 +20,17 @@ public final class PropertyUtil extends PropertyUtilBase {
}
@Nullable
public static PsiField getFieldOfGetter(PsiMethod method) {
public static PsiField getFieldOfGetter(@NotNull PsiMethod method) {
return getFieldOfGetter(method, true);
}
@Nullable
private static PsiField getFieldOfGetter(PsiMethod method, boolean useIndex) {
private static PsiField getFieldOfGetter(@NotNull PsiMethod method, boolean useIndex) {
return getFieldOfGetter(method, () -> getGetterReturnExpression(method), useIndex);
}
@Nullable
public static PsiField getFieldOfGetter(PsiMethod method, Supplier<? extends PsiExpression> returnExprSupplier, boolean useIndex) {
public static PsiField getFieldOfGetter(@NotNull PsiMethod method, Supplier<? extends PsiExpression> returnExprSupplier, boolean useIndex) {
PsiField field = getFieldImpl(method, returnExprSupplier, useIndex);
if (field == null || !checkFieldLocation(method, field)) return null;
final PsiType returnType = method.getReturnType();