This is an automated email from the ASF dual-hosted git repository. rabbah pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/openwhisk.git
The following commit(s) were added to refs/heads/master by this push: new 6219e8c Remove usages of Unit as a value. (#4838) 6219e8c is described below commit 6219e8c762ab7d1398434ab5d416dfeaeee9774a Author: Markus Thömmes <markusthoem...@me.com> AuthorDate: Tue Feb 25 13:53:54 2020 +0100 Remove usages of Unit as a value. (#4838) Scala 2.13 forbids using Unit (the type) in a return expression. Switched occurrences to use the "proper" Unit value. --- .../org/apache/openwhisk/core/database/RemoteCacheInvalidation.scala | 2 +- .../scala/org/apache/openwhisk/core/mesos/MesosContainerFactory.scala | 2 +- .../src/main/scala/org/apache/openwhisk/core/yarn/YARNTask.scala | 2 +- .../main/scala/org/apache/openwhisk/core/database/UserCommand.scala | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/common/scala/src/main/scala/org/apache/openwhisk/core/database/RemoteCacheInvalidation.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/database/RemoteCacheInvalidation.scala index 62d06c8..c8c432b 100644 --- a/common/scala/src/main/scala/org/apache/openwhisk/core/database/RemoteCacheInvalidation.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/database/RemoteCacheInvalidation.scala @@ -65,7 +65,7 @@ class RemoteCacheInvalidation(config: WhiskConfig, component: String, instance: private val cacheInvalidationProducer = msgProvider.getProducer(config) def notifyOtherInstancesAboutInvalidation(key: CacheKey): Future[Unit] = { - cacheInvalidationProducer.send(cacheInvalidationTopic, CacheInvalidationMessage(key, instanceId)).map(_ => Unit) + cacheInvalidationProducer.send(cacheInvalidationTopic, CacheInvalidationMessage(key, instanceId)).map(_ => ()) } private val invalidationFeed = as.actorOf(Props { diff --git a/common/scala/src/main/scala/org/apache/openwhisk/core/mesos/MesosContainerFactory.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/mesos/MesosContainerFactory.scala index fab8597..b44d147 100644 --- a/common/scala/src/main/scala/org/apache/openwhisk/core/mesos/MesosContainerFactory.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/mesos/MesosContainerFactory.scala @@ -178,7 +178,7 @@ class MesosContainerFactory(config: WhiskConfig, } }) - override def init(): Unit = Unit + override def init(): Unit = () /** Cleanups any remaining Containers; should block until complete; should ONLY be run at shutdown. */ override def cleanup(): Unit = { diff --git a/common/scala/src/main/scala/org/apache/openwhisk/core/yarn/YARNTask.scala b/common/scala/src/main/scala/org/apache/openwhisk/core/yarn/YARNTask.scala index 714a04e..0f98853 100644 --- a/common/scala/src/main/scala/org/apache/openwhisk/core/yarn/YARNTask.scala +++ b/common/scala/src/main/scala/org/apache/openwhisk/core/yarn/YARNTask.scala @@ -64,7 +64,7 @@ class YARNTask(override protected val id: ContainerId, /** Dual of halt. */ override def resume()(implicit transid: TransactionId): Future[Unit] = { // resume not supported - Future.successful(Unit) + Future.successful(()) } /** Completely destroys this instance of the container. */ diff --git a/tools/admin/src/main/scala/org/apache/openwhisk/core/database/UserCommand.scala b/tools/admin/src/main/scala/org/apache/openwhisk/core/database/UserCommand.scala index 4e4247b..6f41f63 100644 --- a/tools/admin/src/main/scala/org/apache/openwhisk/core/database/UserCommand.scala +++ b/tools/admin/src/main/scala/org/apache/openwhisk/core/database/UserCommand.scala @@ -59,7 +59,7 @@ class UserCommand extends Subcommand("user") with WhiskCommand { if (s.length < 5) { Left(CommandMessages.shortName) } else { - Right(Unit) + Right(()) } } @@ -71,7 +71,7 @@ class UserCommand extends Subcommand("user") with WhiskCommand { } else if (!isUUID(uuid)) { Left(CommandMessages.invalidUUID) } else { - Right(Unit) + Right(()) } case _ => Left(s"failed to determine authorization id and key: $a") }