From fa0ab89b09cb545ba9fae05985d679f2e9515fa9 Mon Sep 17 00:00:00 2001 From: Bas Leijdekkers Date: Sun, 17 Jul 2016 23:33:55 +0200 Subject: [PATCH] IG: exclude another method from moving when scope to broad --- .../src/com/siyeh/ig/dataflow/TooBroadScopeInspectionBase.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/dataflow/TooBroadScopeInspectionBase.java b/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/dataflow/TooBroadScopeInspectionBase.java index abaa5582e5ed..20e963d19d43 100644 --- a/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/dataflow/TooBroadScopeInspectionBase.java +++ b/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/dataflow/TooBroadScopeInspectionBase.java @@ -192,7 +192,8 @@ public class TooBroadScopeInspectionBase extends BaseInspection { return false; } final String methodName = method.getName(); - return !"now".equals(methodName) && !"currentTimeMillis".equals(methodName) && !"nanoTime".equals(methodName); + return !"now".equals(methodName) && !"currentTimeMillis".equals(methodName) && + !"nanoTime".equals(methodName) && !"waitFor".equals(methodName); } private static boolean isAllowedType(PsiType type) {