WrapperTypeMayBePrimitive: ignore while mismatch parameter and arg count

EA-120929
This commit is contained in:
Roman.Ivanov
2018-05-30 11:01:19 +07:00
parent cd72be6365
commit 0b0a2ea0e5
@@ -174,6 +174,7 @@ public class WrapperTypeMayBePrimitiveInspection extends AbstractBaseJavaLocalIn
if (method == null) return true;
PsiParameter[] parameters = method.getParameterList().getParameters();
int parameterIndex = parameters.length < argumentsIndex + 1 ? parameters.length - 1 : argumentsIndex;
if (parameterIndex < 0) return false;
PsiParameter parameter = parameters[parameterIndex];
PsiType type = parameter.getType();
if (type instanceof PsiPrimitiveType) {