pjfanning commented on code in PR #3138:
URL: https://github.com/apache/pekko/pull/3138#discussion_r3458224116
##########
stream/src/main/scala/org/apache/pekko/stream/impl/fusing/StreamOfStreams.scala:
##########
@@ -399,7 +398,7 @@ import pekko.util.OptionVal
lazy val decider =
inheritedAttributes.mandatoryAttribute[SupervisionStrategy].decider
private val activeSubstreamsMap = new java.util.HashMap[Any,
SubstreamSource]()
private val closedSubstreams =
- if (allowClosedSubstreamRecreation)
Collections.unmodifiableSet(Collections.emptySet[Any])
+ if (allowClosedSubstreamRecreation) java.util.Set.of[Any]()
Review Comment:
-1 from me `java.util.Set.of[Any]()` returns a new immutable set - I think
we should keep `Collections.emptySet[Any]` but remove the
`Collections.unmodifiableSet` call because `Collections.emptySet[Any]` is
immutable.
`Collections.emptySet[Any]` is a singleton.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]