diff --git a/java/java-psi-api/src/com/intellij/psi/util/TypeConversionUtil.java b/java/java-psi-api/src/com/intellij/psi/util/TypeConversionUtil.java index f3755f9edf20..ca6169fec37a 100644 --- a/java/java-psi-api/src/com/intellij/psi/util/TypeConversionUtil.java +++ b/java/java-psi-api/src/com/intellij/psi/util/TypeConversionUtil.java @@ -1213,7 +1213,7 @@ public class TypeConversionUtil { final PsiType componentType = ellipsisType.getComponentType(); final PsiType newComponentType = componentType.accept(this); if (newComponentType == componentType) return ellipsisType; - return new PsiArrayType(newComponentType); + return newComponentType != null ? newComponentType.createArrayType() : null; } @Override @@ -1221,7 +1221,7 @@ public class TypeConversionUtil { final PsiType componentType = arrayType.getComponentType(); final PsiType newComponentType = componentType.accept(this); if (newComponentType == componentType) return arrayType; - return newComponentType.createArrayType(); + return newComponentType != null ? newComponentType.createArrayType() : null; } @Override