diff --git a/src/main/java/com/intellij/plugins/haxe/ide/index/HaxeSymbolIndex.java b/src/main/java/com/intellij/plugins/haxe/ide/index/HaxeSymbolIndex.java index 286c454c2..e40a9e90d 100644 --- a/src/main/java/com/intellij/plugins/haxe/ide/index/HaxeSymbolIndex.java +++ b/src/main/java/com/intellij/plugins/haxe/ide/index/HaxeSymbolIndex.java @@ -149,8 +149,8 @@ private static boolean processSubComponent(PsiElementProcessor getNamedComponents(@Nullable final HaxeC if (body != null) { final Collection members = PsiTreeUtil.findChildrenOfAnyType(body, MEMBER_TYPES); for (HaxeNamedComponent member : members) { - if (member instanceof HaxeMethod && ((HaxeMethod)member).isConstructor()) { + if (member instanceof HaxeMethod method && method.isConstructor()) { continue; } components.add(member); diff --git a/src/main/java/com/intellij/plugins/haxe/util/HaxeResolveUtil.java b/src/main/java/com/intellij/plugins/haxe/util/HaxeResolveUtil.java index a926b58f1..301290d52 100644 --- a/src/main/java/com/intellij/plugins/haxe/util/HaxeResolveUtil.java +++ b/src/main/java/com/intellij/plugins/haxe/util/HaxeResolveUtil.java @@ -1325,8 +1325,8 @@ public static String getQName(PsiFile file, final String result, boolean searchI final HaxeImportStatement importStatement = (HaxeImportStatement)(StreamUtil.reverse(Arrays.stream(fileChildren)) .filter(element -> - element instanceof HaxeImportStatement && - ((HaxeImportStatement)element).getModel().exposeByName(result) != null) + element instanceof HaxeImportStatement impStatement + && impStatement.getModel().exposeByName(result) != null) .findFirst() .orElse(null));