From 47e7e23f2ddf3304b116a4c85617e5614d040687 Mon Sep 17 00:00:00 2001 From: "He-Pin(kerr)" Date: Sat, 6 Sep 2025 22:48:52 +0800 Subject: [PATCH] chore: make toAttributes a lazy val (#2157) --- .../main/scala/org/apache/pekko/stream/ActorMaterializer.scala | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/stream/src/main/scala/org/apache/pekko/stream/ActorMaterializer.scala b/stream/src/main/scala/org/apache/pekko/stream/ActorMaterializer.scala index 618adc9cf7..cba9e5338c 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/ActorMaterializer.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/ActorMaterializer.scala @@ -352,7 +352,7 @@ final class ActorMaterializerSettings @InternalApi private ( * INTERNAL API */ @InternalApi - private[pekko] def toAttributes: Attributes = + private[pekko] lazy val toAttributes: Attributes = Attributes( // these are the core stream/materializer settings, ad hoc handling of defaults for the stage specific ones // for stream refs and io live with the respective stages @@ -368,7 +368,6 @@ final class ActorMaterializerSettings @InternalApi private ( ActorAttributes.FuzzingMode(fuzzingMode) :: ActorAttributes.MaxFixedBufferSize(maxFixedBufferSize) :: ActorAttributes.SyncProcessingLimit(syncProcessingLimit) :: - Nil) override def toString: String =