inspection toolwindow: SuppressActionWrapper empty array cleanup
authorDmitry Batkovich <dmitry.batkovich@jetbrains.com>
Wed, 18 May 2016 10:10:02 +0000 (13:10 +0300)
committerDmitry Batkovich <dmitry.batkovich@jetbrains.com>
Wed, 18 May 2016 10:10:02 +0000 (13:10 +0300)
platform/lang-impl/src/com/intellij/codeInspection/ui/actions/suppress/SuppressActionWrapper.java

index 3a8233a775a50b4242378b47f8f42076fed19cd9..ce26e08a2d0e9ab169fff0eda057e58eb2590d12 100644 (file)
@@ -55,8 +55,6 @@ import static com.intellij.codeInspection.ui.actions.InspectionViewActionBase.ge
 public class SuppressActionWrapper extends ActionGroup implements CompactActionGroup {
   private final static Logger LOG = Logger.getInstance(SuppressActionWrapper.class);
 
-  public static final SuppressIntentionAction[] EMPTY_ARRAY = new SuppressIntentionAction[0];
-
   public SuppressActionWrapper() {
     super(InspectionsBundle.message("suppress.inspection.problem"), false);
   }
@@ -70,7 +68,7 @@ public class SuppressActionWrapper extends ActionGroup implements CompactActionG
     if (wrapper == null) return AnAction.EMPTY_ARRAY;
     final Set<SuppressIntentionAction> suppressActions = view.getSuppressActions(wrapper);
 
-    if (suppressActions.isEmpty()) return new SuppressTreeAction[0];
+    if (suppressActions.isEmpty()) return AnAction.EMPTY_ARRAY;
     final AnAction[] actions = new AnAction[suppressActions.size() + 1];
 
     int i = 0;