You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pekko.apache.org by fa...@apache.org on 2025/09/11 17:37:54 UTC

(pekko-connectors) branch main updated: avoid deprecated pekko japi function (#1132)

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-connectors.git


The following commit(s) were added to refs/heads/main by this push:
     new f87e0b64e avoid deprecated pekko japi function (#1132)
f87e0b64e is described below

commit f87e0b64e11920058097b82d149919328f768329
Author: PJ Fanning <pj...@users.noreply.github.com>
AuthorDate: Thu Sep 11 18:37:49 2025 +0100

    avoid deprecated pekko japi function (#1132)
    
    * avoid deprecated pekko japi function
    
    * Create switch-function-interface.excludes
---
 .../switch-function-interface.excludes              | 21 +++++++++++++++++++++
 .../cassandra/javadsl/CassandraFlow.scala           |  6 +++---
 .../test/java/docs/javadsl/CassandraFlowTest.java   |  2 +-
 3 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/cassandra/src/main/mima-filters/2.0.x.backwards.excludes/switch-function-interface.excludes b/cassandra/src/main/mima-filters/2.0.x.backwards.excludes/switch-function-interface.excludes
new file mode 100644
index 000000000..5f66b950f
--- /dev/null
+++ b/cassandra/src/main/mima-filters/2.0.x.backwards.excludes/switch-function-interface.excludes
@@ -0,0 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Switch to pekko.japi.function Functional Interfaces
+ProblemFilters.exclude[IncompatibleMethTypeProblem]("org.apache.pekko.stream.connectors.cassandra.javadsl.CassandraFlow.createUnloggedBatch")
+ProblemFilters.exclude[IncompatibleMethTypeProblem]("org.apache.pekko.stream.connectors.cassandra.javadsl.CassandraFlow.withContext")
+ProblemFilters.exclude[IncompatibleMethTypeProblem]("org.apache.pekko.stream.connectors.cassandra.javadsl.CassandraFlow.create")
diff --git a/cassandra/src/main/scala/org/apache/pekko/stream/connectors/cassandra/javadsl/CassandraFlow.scala b/cassandra/src/main/scala/org/apache/pekko/stream/connectors/cassandra/javadsl/CassandraFlow.scala
index e9062138f..116aa19df 100644
--- a/cassandra/src/main/scala/org/apache/pekko/stream/connectors/cassandra/javadsl/CassandraFlow.scala
+++ b/cassandra/src/main/scala/org/apache/pekko/stream/connectors/cassandra/javadsl/CassandraFlow.scala
@@ -38,7 +38,7 @@ object CassandraFlow {
   def create[T](session: CassandraSession,
       writeSettings: CassandraWriteSettings,
       cqlStatement: String,
-      statementBinder: pekko.japi.Function2[T, PreparedStatement, BoundStatement]): Flow[T, T, NotUsed] =
+      statementBinder: pekko.japi.function.Function2[T, PreparedStatement, BoundStatement]): Flow[T, T, NotUsed] =
     scaladsl.CassandraFlow
       .create(writeSettings, cqlStatement, (t, preparedStatement) => statementBinder.apply(t, preparedStatement))(
         session.delegate)
@@ -59,7 +59,7 @@ object CassandraFlow {
       session: CassandraSession,
       writeSettings: CassandraWriteSettings,
       cqlStatement: String,
-      statementBinder: pekko.japi.Function2[T, PreparedStatement, BoundStatement])
+      statementBinder: pekko.japi.function.Function2[T, PreparedStatement, BoundStatement])
       : FlowWithContext[T, Ctx, T, Ctx, NotUsed] = {
     scaladsl.CassandraFlow
       .withContext(writeSettings, cqlStatement, (t, preparedStatement) => statementBinder.apply(t, preparedStatement))(
@@ -92,7 +92,7 @@ object CassandraFlow {
       writeSettings: CassandraWriteSettings,
       cqlStatement: String,
       statementBinder: (T, PreparedStatement) => BoundStatement,
-      groupingKey: pekko.japi.Function[T, K]): Flow[T, T, NotUsed] = {
+      groupingKey: pekko.japi.function.Function[T, K]): Flow[T, T, NotUsed] = {
     scaladsl.CassandraFlow
       .createBatch(writeSettings,
         cqlStatement,
diff --git a/cassandra/src/test/java/docs/javadsl/CassandraFlowTest.java b/cassandra/src/test/java/docs/javadsl/CassandraFlowTest.java
index 5a6c562ce..4be99698e 100644
--- a/cassandra/src/test/java/docs/javadsl/CassandraFlowTest.java
+++ b/cassandra/src/test/java/docs/javadsl/CassandraFlowTest.java
@@ -17,7 +17,7 @@ import org.apache.pekko.Done;
 // #prepared
 import org.apache.pekko.NotUsed;
 import org.apache.pekko.actor.ActorSystem;
-import org.apache.pekko.japi.Function2;
+import org.apache.pekko.japi.function.Function2;
 import org.apache.pekko.japi.Pair;
 import org.apache.pekko.stream.connectors.cassandra.CassandraWriteSettings;
 import org.apache.pekko.stream.connectors.cassandra.javadsl.CassandraFlow;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org