From 8068009f41491b237c879a33acea85cbf75a01bf Mon Sep 17 00:00:00 2001 From: Grzegorz Skrobisz Date: Thu, 18 May 2023 13:27:32 +0200 Subject: [PATCH 1/2] Expose Array class methods --- .../engine/api/process/ClassExtractionSettings.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions-api/src/main/scala/pl/touk/nussknacker/engine/api/process/ClassExtractionSettings.scala b/extensions-api/src/main/scala/pl/touk/nussknacker/engine/api/process/ClassExtractionSettings.scala index 6b0805da421..21316456f90 100644 --- a/extensions-api/src/main/scala/pl/touk/nussknacker/engine/api/process/ClassExtractionSettings.scala +++ b/extensions-api/src/main/scala/pl/touk/nussknacker/engine/api/process/ClassExtractionSettings.scala @@ -225,7 +225,7 @@ object ClassExtractionSettings { SuperClassPredicate(ExactClassPredicate[UUID]), Set("clockSequence", "randomUUID", "fromString", "getLeastSignificantBits", "getMostSignificantBits", "node", "timestamp", ToStringMethod, "variant", "version")), MemberNamePredicate( - SuperClassPredicate(ExactClassPredicate(classOf[Iterable[_]], classOf[Option[_]])), + SuperClassPredicate(ExactClassPredicate(classOf[Iterable[_]], classOf[Option[_]], classOf[Array[_]])), Set("apply", "applyOrElse", "contains", "get", "getOrDefault", "head", "indexOf", "isDefined", "isEmpty", "nonEmpty", "orNull", "size", "tail", "values", "keys", "diff")) ) From e8ee47eccd88fe1de60036f3fac07ae6fc835545 Mon Sep 17 00:00:00 2001 From: Grzegorz Skrobisz Date: Thu, 18 May 2023 17:52:27 +0200 Subject: [PATCH 2/2] fix --- .../engine/api/process/ClassExtractionSettings.scala | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/extensions-api/src/main/scala/pl/touk/nussknacker/engine/api/process/ClassExtractionSettings.scala b/extensions-api/src/main/scala/pl/touk/nussknacker/engine/api/process/ClassExtractionSettings.scala index 21316456f90..cf4c9a717dc 100644 --- a/extensions-api/src/main/scala/pl/touk/nussknacker/engine/api/process/ClassExtractionSettings.scala +++ b/extensions-api/src/main/scala/pl/touk/nussknacker/engine/api/process/ClassExtractionSettings.scala @@ -225,8 +225,11 @@ object ClassExtractionSettings { SuperClassPredicate(ExactClassPredicate[UUID]), Set("clockSequence", "randomUUID", "fromString", "getLeastSignificantBits", "getMostSignificantBits", "node", "timestamp", ToStringMethod, "variant", "version")), MemberNamePredicate( - SuperClassPredicate(ExactClassPredicate(classOf[Iterable[_]], classOf[Option[_]], classOf[Array[_]])), - Set("apply", "applyOrElse", "contains", "get", "getOrDefault", "head", "indexOf", "isDefined", "isEmpty", "nonEmpty", "orNull", "size", "tail", "values", "keys", "diff")) + SuperClassPredicate(ExactClassPredicate(classOf[Iterable[_]], classOf[Option[_]])), + Set("apply", "applyOrElse", "contains", "get", "getOrDefault", "head", "indexOf", "isDefined", "isEmpty", "nonEmpty", "orNull", "size", "tail", "values", "keys", "diff")), + MemberNamePredicate( + SuperClassPredicate(ClassPredicate { case c => c.isArray }), + Set("contains", "head", "indexOf", "isEmpty", "size", "tail", "diff", "toString")), ) lazy val IncludedSerializableMembers: List[ClassMemberPredicate] =