diff --git a/build.gradle.kts b/build.gradle.kts index d3f36fd34fa..4ebbb23be83 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -16,7 +16,7 @@ plugins { id("io.freefair.maven-central.validate-poms") version "8.4" id("me.qoomon.git-versioning") version "6.4.3" id("com.github.ben-manes.versions") version "0.50.0" - id("org.springframework.boot") version "3.1.5" + id("org.springframework.boot") version "3.2.1" id("io.spring.dependency-management") version "1.1.4" id("io.github.1c-syntax.bslls-dev-tools") version "0.7.3" id("ru.vyarus.pom") version "2.2.2" diff --git a/src/main/java/com/github/_1c_syntax/bsl/languageserver/infrastructure/UtilsConfiguration.java b/src/main/java/com/github/_1c_syntax/bsl/languageserver/infrastructure/UtilsConfiguration.java index 55480c69a23..bf9314fc585 100644 --- a/src/main/java/com/github/_1c_syntax/bsl/languageserver/infrastructure/UtilsConfiguration.java +++ b/src/main/java/com/github/_1c_syntax/bsl/languageserver/infrastructure/UtilsConfiguration.java @@ -22,19 +22,23 @@ package com.github._1c_syntax.bsl.languageserver.infrastructure; import com.github._1c_syntax.utils.StringInterner; +import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Role; /** * Конфигурация бинов из 1c-syntax/utils. */ @Configuration +@Role(BeanDefinition.ROLE_INFRASTRUCTURE) public class UtilsConfiguration { /** * @return Настроенный объект интернирователя строк. */ @Bean + @Role(BeanDefinition.ROLE_INFRASTRUCTURE) public StringInterner stringInterner() { return new StringInterner(); } diff --git a/src/test/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/DenyIncompleteValuesDiagnosticTest.java b/src/test/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/DenyIncompleteValuesDiagnosticTest.java index 4e56232c7d8..c2c2384ca84 100644 --- a/src/test/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/DenyIncompleteValuesDiagnosticTest.java +++ b/src/test/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/DenyIncompleteValuesDiagnosticTest.java @@ -86,17 +86,16 @@ private void checkMockHandler(ModuleType type, boolean noneModules) { var documentContext = spy(getDocumentContext()); when(documentContext.getModuleType()).thenReturn(type); - final var infoReg = spy(context.getConfiguration().findChild(MdoReference.create(MDOType.INFORMATION_REGISTER, - "РегистрСведений1")).get() + final var infoReg = spy((InformationRegister) context.getConfiguration().findChild(MdoReference.create(MDOType.INFORMATION_REGISTER, + "РегистрСведений1")).orElseThrow() ); - var spyMdo = spy((InformationRegister) infoReg); - when(documentContext.getMdObject()).thenReturn(Optional.of(spyMdo)); + when(documentContext.getMdObject()).thenReturn(Optional.of(infoReg)); if (noneModules) { - when(spyMdo.getModules()).thenReturn(Collections.emptyList()); + when(infoReg.getModules()).thenReturn(Collections.emptyList()); - List children = List.of(spyMdo); + List children = List.of(infoReg); var configuration = spy(context.getConfiguration()); when(configuration.getChildren()).thenReturn(children);