diff --git a/src/main/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/UsingSynchronousCallsDiagnostic.java b/src/main/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/UsingSynchronousCallsDiagnostic.java index b59d988649..3cb4320e56 100644 --- a/src/main/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/UsingSynchronousCallsDiagnostic.java +++ b/src/main/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/UsingSynchronousCallsDiagnostic.java @@ -154,8 +154,9 @@ private static boolean isServerModule(DocumentContext documentContext) { private static boolean isServerCommonModule(DocumentContext documentContext) { var mdObject = documentContext.getMdObject(); - return mdObject.map(mdo -> (CommonModule) mdo) - .filter(commonModule -> !(commonModule.isClientManagedApplication() || commonModule.isClientOrdinaryApplication())) + return mdObject.map(CommonModule.class::cast) + .filter(commonModule -> !(commonModule.isClientManagedApplication() || + commonModule.isClientOrdinaryApplication())) .isPresent(); }