This is an automated email from the ASF dual-hosted git repository.
pjfanning pushed a commit to branch 1.4.x
in repository https://gitbox.apache.org/repos/asf/pekko-persistence-jdbc.git
The following commit(s) were added to refs/heads/1.4.x by this push:
new 25448623 remove PluginVersionChecker (#559) (#623)
25448623 is described below
commit 25448623e8a8862c50aa1444f54d2ded79911a6c
Author: PJ Fanning <[email protected]>
AuthorDate: Thu Sep 17 16:18:18 2026 +0100
remove PluginVersionChecker (#559) (#623)
* remove PluginVersionChecker
* Create remove-class-check.excludes
---
.../remove-class-check.excludes | 20 ++++++++++++++
.../jdbc/journal/JdbcAsyncWriteJournal.scala | 3 ---
.../jdbc/query/scaladsl/JdbcReadJournal.scala | 9 +++----
.../jdbc/util/PluginVersionChecker.scala | 31 ----------------------
4 files changed, 23 insertions(+), 40 deletions(-)
diff --git
a/core/src/main/mima-filters/1.4.x.backwards.excludes/remove-class-check.excludes
b/core/src/main/mima-filters/1.4.x.backwards.excludes/remove-class-check.excludes
new file mode 100644
index 00000000..61e89427
--- /dev/null
+++
b/core/src/main/mima-filters/1.4.x.backwards.excludes/remove-class-check.excludes
@@ -0,0 +1,20 @@
+# 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.
+
+# remove PluginVersionChecker
+ProblemFilters.exclude[MissingClassProblem]("org.apache.pekko.persistence.jdbc.util.PluginVersionChecker")
+ProblemFilters.exclude[MissingClassProblem]("org.apache.pekko.persistence.jdbc.util.PluginVersionChecker$")
diff --git
a/core/src/main/scala/org/apache/pekko/persistence/jdbc/journal/JdbcAsyncWriteJournal.scala
b/core/src/main/scala/org/apache/pekko/persistence/jdbc/journal/JdbcAsyncWriteJournal.scala
index 3dafed3f..b45bffae 100644
---
a/core/src/main/scala/org/apache/pekko/persistence/jdbc/journal/JdbcAsyncWriteJournal.scala
+++
b/core/src/main/scala/org/apache/pekko/persistence/jdbc/journal/JdbcAsyncWriteJournal.scala
@@ -35,7 +35,6 @@ import scala.collection.immutable._
import scala.concurrent.{ ExecutionContext, Future }
import scala.util.{ Failure, Success, Try }
import pekko.pattern.pipe
-import pekko.persistence.jdbc.util.PluginVersionChecker
object JdbcAsyncWriteJournal {
private case class WriteFinished(pid: String, f: Future[_])
@@ -57,8 +56,6 @@ class JdbcAsyncWriteJournal(config: Config) extends
AsyncWriteJournal {
implicit val mat: Materializer = SystemMaterializer(system).materializer
val journalConfig = new JournalConfig(config)
- PluginVersionChecker.check()
-
val slickDb: SlickDatabase = SlickExtension(system).database(config)
def db: Database = slickDb.database
diff --git
a/core/src/main/scala/org/apache/pekko/persistence/jdbc/query/scaladsl/JdbcReadJournal.scala
b/core/src/main/scala/org/apache/pekko/persistence/jdbc/query/scaladsl/JdbcReadJournal.scala
index db0e3782..a9b0d04a 100644
---
a/core/src/main/scala/org/apache/pekko/persistence/jdbc/query/scaladsl/JdbcReadJournal.scala
+++
b/core/src/main/scala/org/apache/pekko/persistence/jdbc/query/scaladsl/JdbcReadJournal.scala
@@ -18,10 +18,12 @@ package scaladsl
import org.apache.pekko
import pekko.NotUsed
import pekko.actor.ExtendedActorSystem
+import pekko.actor.Scheduler
import pekko.persistence.jdbc.config.ReadJournalConfig
-import pekko.persistence.jdbc.query.JournalSequenceActor.{ GetMaxOrderingId,
MaxOrderingId }
import pekko.persistence.jdbc.db.SlickExtension
import pekko.persistence.jdbc.journal.dao.FlowControl
+import pekko.persistence.jdbc.query.JournalSequenceActor.{ GetMaxOrderingId,
MaxOrderingId }
+import pekko.persistence.jdbc.query.dao.ReadJournalDao
import pekko.persistence.query.scaladsl._
import pekko.persistence.query.{ EventEnvelope, Offset, Sequence }
import pekko.persistence.{ Persistence, PersistentRepr }
@@ -37,9 +39,6 @@ import scala.collection.immutable._
import scala.concurrent.duration._
import scala.concurrent.{ ExecutionContext, Future }
import scala.util.{ Failure, Success }
-import pekko.actor.Scheduler
-import pekko.persistence.jdbc.query.dao.ReadJournalDao
-import pekko.persistence.jdbc.util.PluginVersionChecker
object JdbcReadJournal {
final val Identifier = "jdbc-read-journal"
@@ -54,8 +53,6 @@ class JdbcReadJournal(config: Config, configPath:
String)(implicit val system: E
with CurrentEventsByTagQuery
with EventsByTagQuery {
- PluginVersionChecker.check()
-
implicit val ec: ExecutionContext = system.dispatcher
implicit val mat: Materializer = SystemMaterializer(system).materializer
diff --git
a/core/src/main/scala/org/apache/pekko/persistence/jdbc/util/PluginVersionChecker.scala
b/core/src/main/scala/org/apache/pekko/persistence/jdbc/util/PluginVersionChecker.scala
deleted file mode 100644
index f1380956..00000000
---
a/core/src/main/scala/org/apache/pekko/persistence/jdbc/util/PluginVersionChecker.scala
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * license agreements; and to You under the Apache License, version 2.0:
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * This file is part of the Apache Pekko project, which was derived from Akka.
- */
-
-/*
- * Copyright (C) 2014 - 2019 Dennis Vriend <https://github.com/dnvriend>
- * Copyright (C) 2019 - 2021 Lightbend Inc. <https://www.lightbend.com>
- */
-
-package org.apache.pekko.persistence.jdbc.util
-
-import org.apache.pekko.annotation.InternalApi
-
-@InternalApi
-private[jdbc] object PluginVersionChecker {
- def check(): Unit =
- try {
-
Class.forName("org.apache.pekko.persistence.jdbc.util.DefaultSlickDatabaseProvider")
- throw new RuntimeException(
- "Old version of Apache Pekko Persistence JDBC found on the classpath.
Remove `com.github.dnvriend:pekko-persistence-jdbc` from the classpath..")
- } catch {
- case _: ClassNotFoundException =>
- // All good! That's intentional.
- // It's good if we don't have
pekko.persistence.jdbc.util.DefaultSlickDatabaseProvider around
- }
-}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]