pjfanning commented on code in PR #3720:
URL: https://github.com/apache/pekko/pull/3720#discussion_r4398309103
##########
actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/LoggingTestKit.scala:
##########
@@ -94,7 +94,7 @@ import org.slf4j.event.Level
/**
* Matching events for which the supplied function returns `true`.
*/
- def withCustom(newCustom: Function[LoggingEvent, Boolean]): LoggingTestKit
+ def withCustom(newCustom: Function[? >: LoggingEvent, Boolean]):
LoggingTestKit
Review Comment:
Agreed - reproduced the `missing parameter type` with 2.13. Reverted
`withCustom` and `custom` to `Function[LoggingEvent, Boolean]` and dropped
their two excludes in f0d6698861; `LoggingTestKit.expect` keeps the widened
`Supplier`. I also checked the other `scala.Function*`/`PartialFunction`
entries across the wildcard excludes: this was the only `scala.FunctionN` with
a `? >:` bound (the `recoverWith*` outer `? <:` was already in 1.0.0 and `{
case ... => }` literals still compile on 2.13).
##########
cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/javadsl/ReplicatorMessageAdapter.scala:
##########
@@ -75,7 +75,8 @@ class ReplicatorMessageAdapter[A, B <: ReplicatedData](
* the given `responseAdapter` function.
*/
def subscribe(
Review Comment:
Good catch - reverted `ReplicatorMessageAdapter` to its previous signatures
and dropped its five excludes in f0d6698861. I re-checked the owners of every
entry in the wildcard-bounds excludes files (main, #3718, #3719, this PR): all
others are objects, `final`, `sealed`, `@DoNotInherit` or internal. The PR
description now lists it as deliberately not changed.
##########
cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/javadsl/ShardedDaemonProcess.scala:
##########
@@ -115,7 +115,8 @@ abstract class ShardedDaemonProcess {
messageClass: Class[T],
name: String,
initialNumberOfInstances: Int,
- behaviorFactory: JFunction[ShardedDaemonProcessContext, Behavior[T]]):
ActorRef[ShardedDaemonProcessCommand]
+ behaviorFactory: JFunction[? >: ShardedDaemonProcessContext, ? <:
Behavior[T]])
Review Comment:
Done in f0d6698861 - all four `init` overloads (and
`ShardedDaemonProcessImpl`) now take `IntFunction[? <: Behavior[T]]`, with MiMa
excludes, checked on 2.13 and 3.3.8. Added
`ShardedDaemonProcessCompileOnlyTest.acceptFactoriesOfBehaviorSubtypes`, which
passes a pre-typed `IntFunction<AbstractBehavior<Command>>` to each overload
and only compiles with the widened signature.
--
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]