From e3932e5dfa349cd0e13e2975e66e230a1f1bffb1 Mon Sep 17 00:00:00 2001 From: Arnout Engelen Date: Tue, 16 Apr 2019 09:09:00 +0200 Subject: [PATCH] Fix warnings in akka-osgi #26088 --- akka-osgi/src/main/scala/akka/osgi/ActorSystemActivator.scala | 4 ++++ .../src/main/scala/akka/osgi/OsgiActorSystemFactory.scala | 3 ++- project/AkkaDisciplinePlugin.scala | 1 - 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/akka-osgi/src/main/scala/akka/osgi/ActorSystemActivator.scala b/akka-osgi/src/main/scala/akka/osgi/ActorSystemActivator.scala index fab8ad6b06..05ffbc5cad 100644 --- a/akka-osgi/src/main/scala/akka/osgi/ActorSystemActivator.scala +++ b/akka-osgi/src/main/scala/akka/osgi/ActorSystemActivator.scala @@ -6,6 +6,8 @@ package akka.osgi import akka.actor.ActorSystem import java.util.{ Dictionary, Properties } + +import com.github.ghik.silencer.silent import org.osgi.framework._ import org.osgi.service.log.LogService import com.typesafe.config.{ Config, ConfigFactory } @@ -112,6 +114,7 @@ abstract class ActorSystemActivator extends BundleActivator { * @param context the bundle context * @return the actor system name */ + @silent def getActorSystemName(context: BundleContext): String = null /** @@ -124,6 +127,7 @@ abstract class ActorSystemActivator extends BundleActivator { * @param context the bundle context * @return the actor system specific configuration, ConfigFactory.empty by default */ + @silent def getActorSystemConfiguration(context: BundleContext): Config = ConfigFactory.empty } diff --git a/akka-osgi/src/main/scala/akka/osgi/OsgiActorSystemFactory.scala b/akka-osgi/src/main/scala/akka/osgi/OsgiActorSystemFactory.scala index b902b26122..84c03b81bc 100644 --- a/akka-osgi/src/main/scala/akka/osgi/OsgiActorSystemFactory.scala +++ b/akka-osgi/src/main/scala/akka/osgi/OsgiActorSystemFactory.scala @@ -5,6 +5,7 @@ package akka.osgi import akka.actor.ActorSystem +import akka.util.unused import com.typesafe.config.{ Config, ConfigFactory } import org.osgi.framework.BundleContext @@ -40,7 +41,7 @@ class OsgiActorSystemFactory( * ensuring that the default/reference configuration is loaded from the akka-actor bundle. * Configuration files found in akka-actor bundle */ - def actorSystemConfig(context: BundleContext): Config = { + def actorSystemConfig(@unused context: BundleContext): Config = { config.withFallback( ConfigFactory .load(classloader) diff --git a/project/AkkaDisciplinePlugin.scala b/project/AkkaDisciplinePlugin.scala index eced06e3f2..f15d33ad0b 100644 --- a/project/AkkaDisciplinePlugin.scala +++ b/project/AkkaDisciplinePlugin.scala @@ -32,7 +32,6 @@ object AkkaDisciplinePlugin extends AutoPlugin with ScalafixSupport { "akka-bench-jmh", "akka-bench-jmh-typed", "akka-multi-node-testkit", - "akka-osgi", "akka-persistence-tck", "akka-persistence-typed", "akka-persistence-query",