From 95eff6f3cfaf4ff1b8792c46877dcd3060b7e160 Mon Sep 17 00:00:00 2001 From: Max Medvedev Date: Thu, 22 Nov 2012 20:21:37 +0400 Subject: [PATCH] EA-39371 - NPE: GenericInlineHandler.initializeInliners --- .../intellij/refactoring/inline/InlineMethodProcessor.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/java/java-impl/src/com/intellij/refactoring/inline/InlineMethodProcessor.java b/java/java-impl/src/com/intellij/refactoring/inline/InlineMethodProcessor.java index 0503ab380e50..dd9676f84fb2 100644 --- a/java/java-impl/src/com/intellij/refactoring/inline/InlineMethodProcessor.java +++ b/java/java-impl/src/com/intellij/refactoring/inline/InlineMethodProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2012 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -250,7 +250,10 @@ public class InlineMethodProcessor extends BaseRefactoringProcessor { private static ArrayList convertUsagesToRefs(UsageInfo[] usagesIn) { ArrayList refs = new ArrayList(); for (UsageInfo info : usagesIn) { - refs.add(info.getReference()); + final PsiReference ref = info.getReference(); + if (ref != null) { //ref can be null if it is conflict usage info + refs.add(ref); + } } return refs; }