This is an automated email from the ASF dual-hosted git repository.
fanningpj pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pekko.git
The following commit(s) were added to refs/heads/main by this push:
new 9e540b1236 remove deprecated names annotations (#1985)
9e540b1236 is described below
commit 9e540b12367f60e9f9411d80c0c48007c9ad3645
Author: PJ Fanning <[email protected]>
AuthorDate: Thu Jul 31 20:03:35 2025 +0100
remove deprecated names annotations (#1985)
---
.../scala/org/apache/pekko/actor/typed/javadsl/Routers.scala | 4 +---
.../scala/org/apache/pekko/actor/typed/scaladsl/Routers.scala | 5 +----
actor/src/main/scala/org/apache/pekko/actor/FSM.scala | 4 +---
.../scala/org/apache/pekko/persistence/fsm/PersistentFSM.scala | 2 +-
stream/src/main/scala/org/apache/pekko/stream/Materializer.scala | 2 +-
stream/src/main/scala/org/apache/pekko/stream/javadsl/Sink.scala | 3 ---
.../src/main/scala/org/apache/pekko/stream/javadsl/Source.scala | 4 ----
.../src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala | 9 ---------
.../src/main/scala/org/apache/pekko/stream/scaladsl/Sink.scala | 4 +---
.../src/main/scala/org/apache/pekko/stream/scaladsl/Source.scala | 6 +-----
10 files changed, 7 insertions(+), 36 deletions(-)
diff --git
a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/Routers.scala
b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/Routers.scala
index 8cb969e004..d7367220c7 100644
---
a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/Routers.scala
+++
b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/Routers.scala
@@ -21,7 +21,6 @@ import pekko.actor.typed.receptionist.ServiceKey
import pekko.annotation.DoNotInherit
import java.util.function.Predicate
-import scala.annotation.nowarn
object Routers {
@@ -198,6 +197,5 @@ abstract class PoolRouter[T] extends DeferredBehavior[T] {
/**
* Any message that the predicate returns true for will be broadcast to all
routees.
*/
- @nowarn("msg=deprecated")
- def withBroadcastPredicate(@deprecatedName(Symbol("pred")) predicate:
Predicate[T]): PoolRouter[T]
+ def withBroadcastPredicate(predicate: Predicate[T]): PoolRouter[T]
}
diff --git
a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/Routers.scala
b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/Routers.scala
index 6cd23279c9..abbe5d0046 100644
---
a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/Routers.scala
+++
b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/Routers.scala
@@ -19,8 +19,6 @@ import pekko.actor.typed.internal.routing.{
GroupRouterBuilder, PoolRouterBuilde
import pekko.actor.typed.receptionist.ServiceKey
import pekko.annotation.DoNotInherit
-import scala.annotation.nowarn
-
object Routers {
/**
@@ -188,6 +186,5 @@ trait PoolRouter[T] extends Behavior[T] {
/**
* Any message that the predicate returns true for will be broadcast to all
routees.
*/
- @nowarn("msg=deprecated")
- def withBroadcastPredicate(@deprecatedName(Symbol("pred")) predicate: T =>
Boolean): PoolRouter[T]
+ def withBroadcastPredicate(predicate: T => Boolean): PoolRouter[T]
}
diff --git a/actor/src/main/scala/org/apache/pekko/actor/FSM.scala
b/actor/src/main/scala/org/apache/pekko/actor/FSM.scala
index e8a0ee4bae..41f7fa19b9 100644
--- a/actor/src/main/scala/org/apache/pekko/actor/FSM.scala
+++ b/actor/src/main/scala/org/apache/pekko/actor/FSM.scala
@@ -19,7 +19,6 @@ import scala.concurrent.duration._
import scala.concurrent.duration.Duration
import scala.concurrent.duration.FiniteDuration
-import scala.annotation.nowarn
import language.implicitConversions
import org.apache.pekko
@@ -311,8 +310,7 @@ object FSM {
* Modify state transition descriptor with new state data. The data will be
* set when transitioning to the new state.
*/
- @nowarn("msg=deprecated")
- def using(@deprecatedName(Symbol("nextStateDate")) nextStateData: D):
State[S, D] = {
+ def using(nextStateData: D): State[S, D] = {
copy(stateData = nextStateData)
}
diff --git
a/persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSM.scala
b/persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSM.scala
index 7dd2d3c25f..f0af99c83d 100644
---
a/persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSM.scala
+++
b/persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSM.scala
@@ -447,7 +447,7 @@ object PersistentFSM {
@deprecated(
"Internal API easily to be confused with regular FSM's using. Use
regular events (`applying`). Internally, `copy` can be used instead.",
"Akka 2.5.5")
- private[pekko] def using(@deprecatedName(Symbol("nextStateDate"))
nextStateData: D): State[S, D, E] = {
+ private[pekko] def using(nextStateData: D): State[S, D, E] = {
copy0(stateData = nextStateData)
}
diff --git a/stream/src/main/scala/org/apache/pekko/stream/Materializer.scala
b/stream/src/main/scala/org/apache/pekko/stream/Materializer.scala
index 257ab27b33..35c04210ff 100644
--- a/stream/src/main/scala/org/apache/pekko/stream/Materializer.scala
+++ b/stream/src/main/scala/org/apache/pekko/stream/Materializer.scala
@@ -63,7 +63,7 @@ abstract class Materializer {
*/
def materialize[Mat](
runnable: Graph[ClosedShape, Mat],
- @deprecatedName(Symbol("initialAttributes")) defaultAttributes:
Attributes): Mat
+ defaultAttributes: Attributes): Mat
/**
* Running a flow graph will require execution resources, as will
computations
diff --git a/stream/src/main/scala/org/apache/pekko/stream/javadsl/Sink.scala
b/stream/src/main/scala/org/apache/pekko/stream/javadsl/Sink.scala
index 8280f0023f..6aaa8fc252 100644
--- a/stream/src/main/scala/org/apache/pekko/stream/javadsl/Sink.scala
+++ b/stream/src/main/scala/org/apache/pekko/stream/javadsl/Sink.scala
@@ -18,7 +18,6 @@ import java.util.concurrent.{ CompletableFuture,
CompletionStage }
import java.util.function.BiFunction
import java.util.stream.Collector
-import scala.annotation.nowarn
import scala.annotation.unchecked.uncheckedVariance
import scala.collection.immutable
import scala.concurrent.ExecutionContext
@@ -455,8 +454,6 @@ object Sink {
output1: Sink[U, _],
output2: Sink[U, _],
rest: java.util.List[Sink[U, _]],
- @nowarn
- @deprecatedName(Symbol("strategy"))
fanOutStrategy: function.Function[java.lang.Integer,
Graph[UniformFanOutShape[T, U], NotUsed]])
: Sink[T, NotUsed] = {
import pekko.util.ccompat.JavaConverters._
diff --git a/stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala
b/stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala
index 8ce6c92889..df617695d8 100755
--- a/stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala
+++ b/stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala
@@ -714,8 +714,6 @@ object Source {
first: Source[T, _ <: Any],
second: Source[T, _ <: Any],
rest: java.util.List[Source[T, _ <: Any]],
- @nowarn
- @deprecatedName(Symbol("strategy"))
fanInStrategy: function.Function[java.lang.Integer, _ <:
Graph[UniformFanInShape[T, U], NotUsed]])
: Source[U, NotUsed] = {
val seq = if (rest != null) CollectionUtil.toSeq(rest).map(_.asScala) else
immutable.Seq()
@@ -728,8 +726,6 @@ object Source {
def combineMat[T, U, M1, M2, M](
first: Source[T, M1],
second: Source[T, M2],
- @nowarn
- @deprecatedName(Symbol("strategy"))
fanInStrategy: function.Function[java.lang.Integer, _ <:
Graph[UniformFanInShape[T, U], NotUsed]],
combine: function.Function2[M1, M2, M]): Source[U, M] = {
new Source(
diff --git a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala
b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala
index e178a5c0b1..d101f7593b 100755
--- a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala
+++ b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala
@@ -14,7 +14,6 @@
package org.apache.pekko.stream.scaladsl
import scala.annotation.implicitNotFound
-import scala.annotation.nowarn
import scala.annotation.unchecked.uncheckedVariance
import scala.collection.immutable
import scala.concurrent.Future
@@ -3612,18 +3611,14 @@ trait FlowOps[+Out, +Mat] {
*
* '''completes''' when all upstreams complete (This behavior is changeable
to completing when any upstream completes by setting `eagerComplete=true`.)
*/
- @nowarn
def mergePreferred[U >: Out, M](
that: Graph[SourceShape[U], M],
- @deprecatedName(Symbol("priority"))
preferred: Boolean,
eagerComplete: Boolean = false): Repr[U] =
via(mergePreferredGraph(that, preferred, eagerComplete))
- @nowarn
protected def mergePreferredGraph[U >: Out, M](
that: Graph[SourceShape[U], M],
- @deprecatedName(Symbol("priority"))
preferred: Boolean,
eagerComplete: Boolean): Graph[FlowShape[Out @uncheckedVariance, U], M] =
GraphDSL.createGraph(that) { implicit b => r =>
@@ -4254,10 +4249,8 @@ trait FlowOpsMat[+Out, +Mat] extends FlowOps[Out, Mat] {
* It is recommended to use the internally optimized `Keep.left` and
`Keep.right` combiners
* where appropriate instead of manually writing functions that pass through
one of the values.
*/
- @nowarn("msg=deprecated")
def interleaveMat[U >: Out, Mat2, Mat3](
that: Graph[SourceShape[U], Mat2],
- @deprecatedName(Symbol("request"))
segmentSize: Int)(matF: (Mat, Mat2) => Mat3): ReprMat[U, Mat3] =
interleaveMat(that, segmentSize, eagerClose = false)(matF)
@@ -4277,10 +4270,8 @@ trait FlowOpsMat[+Out, +Mat] extends FlowOps[Out, Mat] {
* It is recommended to use the internally optimized `Keep.left` and
`Keep.right` combiners
* where appropriate instead of manually writing functions that pass through
one of the values.
*/
- @nowarn("msg=deprecated")
def interleaveMat[U >: Out, Mat2, Mat3](
that: Graph[SourceShape[U], Mat2],
- @deprecatedName(Symbol("request"))
segmentSize: Int,
eagerClose: Boolean)(matF: (Mat, Mat2) => Mat3): ReprMat[U, Mat3] =
viaMat(interleaveGraph(that, segmentSize, eagerClose))(matF)
diff --git a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Sink.scala
b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Sink.scala
index af8ebd5ee0..9cb9f08296 100644
--- a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Sink.scala
+++ b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Sink.scala
@@ -13,7 +13,7 @@
package org.apache.pekko.stream.scaladsl
-import scala.annotation.{ nowarn, tailrec }
+import scala.annotation.tailrec
import scala.annotation.unchecked.uncheckedVariance
import scala.collection.immutable
import scala.concurrent.{ ExecutionContext, Future }
@@ -336,8 +336,6 @@ object Sink {
* Combine several sinks with fan-out strategy like `Broadcast` or `Balance`
and returns `Sink`.
*/
def combine[T, U](first: Sink[U, _], second: Sink[U, _], rest: Sink[U, _]*)(
- @nowarn
- @deprecatedName(Symbol("strategy"))
fanOutStrategy: Int => Graph[UniformFanOutShape[T, U], NotUsed]):
Sink[T, NotUsed] =
Sink.fromGraph(GraphDSL.create() { implicit b =>
import GraphDSL.Implicits._
diff --git
a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Source.scala
b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Source.scala
index 5e67380fd8..16d80baa36 100644
--- a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Source.scala
+++ b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Source.scala
@@ -15,7 +15,7 @@ package org.apache.pekko.stream.scaladsl
import java.util.concurrent.CompletionStage
-import scala.annotation.{ nowarn, tailrec }
+import scala.annotation.tailrec
import scala.annotation.unchecked.uncheckedVariance
import scala.collection.{ immutable, AbstractIterator }
import scala.concurrent.{ Future, Promise }
@@ -831,8 +831,6 @@ object Source {
* Combines several sources with fan-in strategy like [[Merge]] or
[[Concat]] into a single [[Source]].
*/
def combine[T, U](first: Source[T, _], second: Source[T, _], rest: Source[T,
_]*)(
- @nowarn
- @deprecatedName(Symbol("strategy"))
fanInStrategy: Int => Graph[UniformFanInShape[T, U], NotUsed]):
Source[U, NotUsed] =
Source.fromGraph(GraphDSL.create() { implicit b =>
import GraphDSL.Implicits._
@@ -873,8 +871,6 @@ object Source {
* Combines several sources with fan-in strategy like [[Merge]] or
[[Concat]] into a single [[Source]] with a materialized value.
*/
def combineMat[T, U, M1, M2, M](first: Source[T, M1], second: Source[T, M2])(
- @nowarn
- @deprecatedName(Symbol("strategy"))
fanInStrategy: Int => Graph[UniformFanInShape[T, U], NotUsed])(matF:
(M1, M2) => M): Source[U, M] =
Source.fromGraph(GraphDSL.createGraph(first, second)(matF) { implicit b =>
(shape1, shape2) =>
import GraphDSL.Implicits._
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]