[java] @NotNull annotation

GitOrigin-RevId: 40336e43420374e8d5202518aaf95e75d5432d47
This commit is contained in:
Tagir Valeev
2024-02-05 15:56:05 +01:00
committed by intellij-monorepo-bot
parent e5558c1da6
commit 384c07c2e4
2 changed files with 2 additions and 2 deletions

View File

@@ -87,7 +87,7 @@ public interface JVMElementFactory {
*
* @throws IncorrectOperationException {@code name} is not a valid Java identifier or {@code type} represents an invalid type.
*/
PsiParameter createParameter(@NotNull String name, PsiType type, @Nullable PsiElement context) throws IncorrectOperationException;
PsiParameter createParameter(@NotNull String name, @NotNull PsiType type, @Nullable PsiElement context) throws IncorrectOperationException;
/**
* Creates a parameter list from the specified parameter names and types.

View File

@@ -276,7 +276,7 @@ public final class PsiElementFactoryImpl extends PsiJavaParserFacadeImpl impleme
}
@Override
public PsiParameter createParameter(@NotNull String name, PsiType type, PsiElement context) throws IncorrectOperationException {
public PsiParameter createParameter(@NotNull String name, @NotNull PsiType type, PsiElement context) throws IncorrectOperationException {
PsiMethod psiMethod = createMethodFromText("void f(" + type.getCanonicalText(true) + " " + name + ") {}", context);
PsiParameter[] parameters = psiMethod.getParameterList().getParameters();
return parameters[0];