From f0f6cf6a3fc643264c65ea5c91458bbdc31b616c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Bigorajski?= Date: Fri, 20 Sep 2024 14:25:03 +0200 Subject: [PATCH] review fixes 5 --- .../suggester/ExpressionSuggesterBenchmarkSetup.scala | 3 ++- .../pl/touk/nussknacker/ui/api/ExpressionSuggesterSpec.scala | 3 ++- .../nussknacker/engine/spel/typer/MethodReferenceTyper.scala | 5 ++--- .../nussknacker/engine/util/functions/BaseSpelSpec.scala | 1 + .../schemedkafka/typed/SpelExpressionSchemedSpec.scala | 3 ++- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/benchmarks/src/test/scala/pl/touk/nussknacker/engine/benchmarks/suggester/ExpressionSuggesterBenchmarkSetup.scala b/benchmarks/src/test/scala/pl/touk/nussknacker/engine/benchmarks/suggester/ExpressionSuggesterBenchmarkSetup.scala index 26622527c20..cd4ca4bcc20 100644 --- a/benchmarks/src/test/scala/pl/touk/nussknacker/engine/benchmarks/suggester/ExpressionSuggesterBenchmarkSetup.scala +++ b/benchmarks/src/test/scala/pl/touk/nussknacker/engine/benchmarks/suggester/ExpressionSuggesterBenchmarkSetup.scala @@ -43,7 +43,8 @@ class ExpressionSuggesterBenchmarkSetup() { clazzDefinitions, dictServices, getClass.getClassLoader, - List.empty + List.empty, + ClassDefinitionTestUtils.DefaultSettings ) private val variables: Map[String, TypingResult] = Map( diff --git a/designer/server/src/test/scala/pl/touk/nussknacker/ui/api/ExpressionSuggesterSpec.scala b/designer/server/src/test/scala/pl/touk/nussknacker/ui/api/ExpressionSuggesterSpec.scala index 664fcf9085c..e699aff9866 100644 --- a/designer/server/src/test/scala/pl/touk/nussknacker/ui/api/ExpressionSuggesterSpec.scala +++ b/designer/server/src/test/scala/pl/touk/nussknacker/ui/api/ExpressionSuggesterSpec.scala @@ -133,7 +133,8 @@ class ExpressionSuggesterSpec clazzDefinitions, dictServices, getClass.getClassLoader, - List("scenarioProperty") + List("scenarioProperty"), + ClassDefinitionTestUtils.DefaultSettings ) private val localVariables: Map[String, TypingResult] = Map( diff --git a/scenario-compiler/src/main/scala/pl/touk/nussknacker/engine/spel/typer/MethodReferenceTyper.scala b/scenario-compiler/src/main/scala/pl/touk/nussknacker/engine/spel/typer/MethodReferenceTyper.scala index 3247eeac574..f61d4697ee5 100644 --- a/scenario-compiler/src/main/scala/pl/touk/nussknacker/engine/spel/typer/MethodReferenceTyper.scala +++ b/scenario-compiler/src/main/scala/pl/touk/nussknacker/engine/spel/typer/MethodReferenceTyper.scala @@ -1,16 +1,15 @@ package pl.touk.nussknacker.engine.spel.typer -import cats.data.{NonEmptyList, ValidatedNel} import cats.data.Validated.{Invalid, Valid} +import cats.data.{NonEmptyList, ValidatedNel} import pl.touk.nussknacker.engine.api.generics.ExpressionParseError import pl.touk.nussknacker.engine.api.typed.typing._ -import pl.touk.nussknacker.engine.definition.clazz.{ClassDefinition, ClassDefinitionSet, MethodDefinition} +import pl.touk.nussknacker.engine.definition.clazz.{ClassDefinition, MethodDefinition} import pl.touk.nussknacker.engine.extension.ClassDefinitionSetExtensionMethodsAware import pl.touk.nussknacker.engine.spel.SpelExpressionParseError.IllegalOperationError.IllegalInvocationError import pl.touk.nussknacker.engine.spel.SpelExpressionParseError.MissingObjectError.UnknownMethodError import pl.touk.nussknacker.engine.spel.SpelExpressionParseError.{ArgumentTypeError, OverloadedFunctionError} -// todo: lbg imports class MethodReferenceTyper( classDefinitionSet: ClassDefinitionSetExtensionMethodsAware, methodExecutionForUnknownAllowed: Boolean diff --git a/utils/default-helpers/src/test/scala/pl/touk/nussknacker/engine/util/functions/BaseSpelSpec.scala b/utils/default-helpers/src/test/scala/pl/touk/nussknacker/engine/util/functions/BaseSpelSpec.scala index c6fcafb4659..addf3bc8193 100644 --- a/utils/default-helpers/src/test/scala/pl/touk/nussknacker/engine/util/functions/BaseSpelSpec.scala +++ b/utils/default-helpers/src/test/scala/pl/touk/nussknacker/engine/util/functions/BaseSpelSpec.scala @@ -37,6 +37,7 @@ trait BaseSpelSpec { enableSpelForceCompile = false, SpelExpressionParser.Standard, classDefinitions, + ClassDefinitionTestUtils.DefaultSettings ) private lazy val classDefinitions = ClassDefinitionTestUtils.createDefinitionForClasses( diff --git a/utils/schemed-kafka-components-utils/src/test/scala/pl/touk/nussknacker/engine/schemedkafka/typed/SpelExpressionSchemedSpec.scala b/utils/schemed-kafka-components-utils/src/test/scala/pl/touk/nussknacker/engine/schemedkafka/typed/SpelExpressionSchemedSpec.scala index e343d86ec86..4b0514740bd 100644 --- a/utils/schemed-kafka-components-utils/src/test/scala/pl/touk/nussknacker/engine/schemedkafka/typed/SpelExpressionSchemedSpec.scala +++ b/utils/schemed-kafka-components-utils/src/test/scala/pl/touk/nussknacker/engine/schemedkafka/typed/SpelExpressionSchemedSpec.scala @@ -25,7 +25,8 @@ class SpelExpressionSchemedSpec extends AnyFunSuite with Matchers with Validated new SimpleDictRegistry(Map.empty), enableSpelForceCompile = false, Standard, - ClassDefinitionTestUtils.createDefinitionForClasses(classOf[GenericRecord]) + ClassDefinitionTestUtils.createDefinitionForClasses(classOf[GenericRecord]), + ClassDefinitionTestUtils.DefaultSettings ) test("compute avro record's get type based on type of fields") {