He-Pin commented on code in PR #3295:
URL: https://github.com/apache/pekko/pull/3295#discussion_r3525665209


##########
stream/src/main/scala/org/apache/pekko/stream/impl/io/InputStreamSinkStage.scala:
##########
@@ -13,7 +13,7 @@
 
 package org.apache.pekko.stream.impl.io
 
-import java.io.{ IOException, InputStream }
+import java.io.{ IOException, InputStream => JavaInputStream }

Review Comment:
   Fixed by removing the unnecessary alias and using `InputStream` directly. 
Verified `stream / Compile / compile` with Scala 2.13.18, 3.3.8 and 3.8.4.



##########
serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/PekkoJacksonModule.scala:
##########
@@ -13,10 +13,37 @@
 
 package org.apache.pekko.serialization.jackson
 
+import java.lang.invoke.MethodHandle
+import java.lang.invoke.MethodHandles
+import java.util.concurrent.ConcurrentHashMap
+import java.util.function.Function
+
+import scala.Enumeration
+import scala.language.existentials
+
+import com.fasterxml.jackson.core.JsonGenerator
+import com.fasterxml.jackson.databind.BeanDescription
+import com.fasterxml.jackson.databind.BeanProperty
+import com.fasterxml.jackson.databind.JavaType
+import com.fasterxml.jackson.databind.JsonSerializer
+import com.fasterxml.jackson.databind.SerializationConfig
+import com.fasterxml.jackson.databind.SerializerProvider
+import com.fasterxml.jackson.databind.ser.ContextualSerializer
+import com.fasterxml.jackson.databind.ser.Serializers
+import com.fasterxml.jackson.databind.ser.std.StdScalarSerializer
+import com.fasterxml.jackson.module.scala.JsonScalaEnumeration
+
+import org.apache.pekko.annotation.InternalApi
+
 /**
  * Complete module with support for all custom serializers.
  */
-class PekkoJacksonModule extends JacksonModule with ActorRefModule with 
AddressModule with FiniteDurationModule {
+class PekkoJacksonModule
+    extends JacksonModule
+    with ActorRefModule
+    with AddressModule
+    with FiniteDurationModule
+    with ScalaEnumerationModule {

Review Comment:
   Added a comment explaining why this override is needed: DefaultScalaModule 
has legacy scala.Enumeration support, but its serializer reads the private 
`$outer` field reflectively and fails for Scala 3.8+ compiled Enumeration 
values with IllegalAccessException. The Pekko serializer preserves the same 
legacy wire format and keeps `@JsonScalaEnumeration` string output working. 
Verified with the Scala 3.8.4 Jackson JSON/CBOR serializer specs.



##########
.github/scripts/resolve-scala-version.sh:
##########
@@ -0,0 +1,32 @@
+#!/usr/bin/env bash
+

Review Comment:
   Fixed by adding the standard ASF license header for the new shell script. 
Verified with `sbt +headerCheckAll`.



-- 
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]

Reply via email to