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 2023/02/15 14:23:24 UTC
[incubator-pekko] branch main updated: remove check for old implementation of Akka Discovery (#189)
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/incubator-pekko.git
The following commit(s) were added to refs/heads/main by this push:
new 4e1da1e8e2 remove check for old implementation of Akka Discovery (#189)
4e1da1e8e2 is described below
commit 4e1da1e8e21182469fb168a5a14aa57129cb40e0
Author: PJ Fanning <pj...@users.noreply.github.com>
AuthorDate: Wed Feb 15 15:23:18 2023 +0100
remove check for old implementation of Akka Discovery (#189)
---
.../scala/org/apache/pekko/discovery/Discovery.scala | 20 --------------------
1 file changed, 20 deletions(-)
diff --git a/discovery/src/main/scala/org/apache/pekko/discovery/Discovery.scala b/discovery/src/main/scala/org/apache/pekko/discovery/Discovery.scala
index e16d4fb745..bdedd85760 100644
--- a/discovery/src/main/scala/org/apache/pekko/discovery/Discovery.scala
+++ b/discovery/src/main/scala/org/apache/pekko/discovery/Discovery.scala
@@ -24,8 +24,6 @@ import pekko.annotation.InternalApi
final class Discovery(implicit system: ExtendedActorSystem) extends Extension {
- Discovery.checkClassPathForOldDiscovery(system)
-
private val implementations = new ConcurrentHashMap[String, ServiceDiscovery]
private val factory = new JFunction[String, ServiceDiscovery] {
override def apply(method: String): ServiceDiscovery = createServiceDiscovery(method)
@@ -119,22 +117,4 @@ object Discovery extends ExtensionId[Discovery] with ExtensionIdProvider {
override def createExtension(system: ExtendedActorSystem): Discovery = new Discovery()(system)
- /**
- * INTERNAL API
- */
- @InternalApi
- private[pekko] def checkClassPathForOldDiscovery(system: ExtendedActorSystem): Unit = {
- try {
- system.dynamicAccess.getClassFor[Any]("org.apache.pekko.discovery.SimpleServiceDiscovery").get
- throw new RuntimeException(
- "Old version of Akka Discovery from Akka Management found on the classpath. Remove `com.lightbend.pekko.discovery:akka-discovery` from the classpath..")
- } catch {
- case _: ClassCastException =>
- throw new RuntimeException(
- "Old version of Akka Discovery from Akka Management found on the classpath. Remove `com.lightbend.pekko.discovery:akka-discovery` from the classpath..")
- case _: ClassNotFoundException =>
- // all good
- }
- }
-
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org