EA-37559 - NPE: HighlightMethodUtil.checkConstructorCall

This commit is contained in:
anna
2012-07-19 16:13:20 +02:00
parent d35061a610
commit 777e950dfa
@@ -1280,19 +1280,21 @@ public class HighlightMethodUtil {
String toolTip = createMismatchedArgumentsHtmlTooltip(result, list);
PsiElement infoElement = list.getTextLength() > 0 ? list : constructorCall;
HighlightInfo info = HighlightInfo.createHighlightInfo(HighlightInfoType.ERROR, infoElement, description, toolTip);
QuickFixAction.registerQuickFixAction(info, constructorCall.getTextRange(), new CreateConstructorFromCallFix(constructorCall));
if (classReference != null) {
ConstructorParametersFixer.registerFixActions(classReference, constructorCall, info, getFixRange(infoElement));
ChangeMethodSignatureFromUsageFix.registerIntentions(results, list, info, null);
ChangeTypeArgumentsFix.registerIntentions(results, list, info, aClass);
ConvertDoubleToFloatFix.registerIntentions(results, list, info, null);
PermuteArgumentsFix.registerFix(info, constructorCall, toMethodCandidates(results), getFixRange(list));
ChangeParameterClassFix.registerQuickFixActions(constructorCall, list, info);
QuickFixAction.registerQuickFixAction(info, getFixRange(list), new SurroundWithArrayFix(constructorCall));
if (info != null) {
QuickFixAction.registerQuickFixAction(info, constructorCall.getTextRange(), new CreateConstructorFromCallFix(constructorCall));
if (classReference != null) {
ConstructorParametersFixer.registerFixActions(classReference, constructorCall, info, getFixRange(infoElement));
ChangeMethodSignatureFromUsageFix.registerIntentions(results, list, info, null);
ChangeTypeArgumentsFix.registerIntentions(results, list, info, aClass);
ConvertDoubleToFloatFix.registerIntentions(results, list, info, null);
PermuteArgumentsFix.registerFix(info, constructorCall, toMethodCandidates(results), getFixRange(list));
ChangeParameterClassFix.registerQuickFixActions(constructorCall, list, info);
QuickFixAction.registerQuickFixAction(info, getFixRange(list), new SurroundWithArrayFix(constructorCall));
}
info.navigationShift = +1;
holder.add(info);
ChangeStringLiteralToCharInMethodCallFix.registerFixes(constructors, constructorCall, info);
}
info.navigationShift = +1;
holder.add(info);
ChangeStringLiteralToCharInMethodCallFix.registerFixes(constructors, constructorCall, info);
}
else {
HighlightInfo highlightInfo;