You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/08/01 14:26:09 UTC

[GitHub] dubee closed pull request #3930: Replace Set() occurrences with Set.empty

dubee closed pull request #3930: Replace Set() occurrences with Set.empty
URL: https://github.com/apache/incubator-openwhisk/pull/3930
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/core/controller/src/main/scala/whisk/core/entitlement/Entitlement.scala b/core/controller/src/main/scala/whisk/core/entitlement/Entitlement.scala
index a553357674..db09d873cf 100644
--- a/core/controller/src/main/scala/whisk/core/entitlement/Entitlement.scala
+++ b/core/controller/src/main/scala/whisk/core/entitlement/Entitlement.scala
@@ -425,7 +425,7 @@ trait ReferencedEntities {
         e.components.map { c =>
           Resource(c.path, Collection(Collection.ACTIONS), Some(c.name.asString))
         }.toSet
-      case _ => Set()
+      case _ => Set.empty
     }
   }
 }
diff --git a/tests/src/test/scala/whisk/core/WhiskConfigTests.scala b/tests/src/test/scala/whisk/core/WhiskConfigTests.scala
index f75f658501..280500da52 100644
--- a/tests/src/test/scala/whisk/core/WhiskConfigTests.scala
+++ b/tests/src/test/scala/whisk/core/WhiskConfigTests.scala
@@ -47,7 +47,7 @@ class WhiskConfigTests extends FlatSpec with Matchers with StreamLogging {
     bw.write("a=A\n")
     bw.close()
 
-    val config = new WhiskConfig(Map("a" -> null), Set(), file)
+    val config = new WhiskConfig(Map("a" -> null), Set.empty, file)
     assert(config.isValid && config("a") == "A")
   }
 
@@ -59,7 +59,7 @@ class WhiskConfigTests extends FlatSpec with Matchers with StreamLogging {
     bw.write("a=A\n")
     bw.close()
 
-    val config = new WhiskConfig(Map("a" -> null, "b" -> null), Set(), file)
+    val config = new WhiskConfig(Map("a" -> null, "b" -> null), Set.empty, file)
     assert(!config.isValid && config("b") == null)
   }
 
diff --git a/tests/src/test/scala/whisk/core/containerpool/logging/ElasticSearchLogStoreTests.scala b/tests/src/test/scala/whisk/core/containerpool/logging/ElasticSearchLogStoreTests.scala
index 91db374f43..8930a43177 100644
--- a/tests/src/test/scala/whisk/core/containerpool/logging/ElasticSearchLogStoreTests.scala
+++ b/tests/src/test/scala/whisk/core/containerpool/logging/ElasticSearchLogStoreTests.scala
@@ -54,7 +54,7 @@ class ElasticSearchLogStoreTests
 
   private val uuid = UUID()
   private val user =
-    Identity(Subject(), Namespace(EntityName("testSpace"), uuid), BasicAuthenticationAuthKey(uuid, Secret()), Set())
+    Identity(Subject(), Namespace(EntityName("testSpace"), uuid), BasicAuthenticationAuthKey(uuid, Secret()), Set.empty)
   private val activationId = ActivationId.generate()
 
   private val defaultLogSchema =
diff --git a/tests/src/test/scala/whisk/core/containerpool/logging/SplunkLogStoreTests.scala b/tests/src/test/scala/whisk/core/containerpool/logging/SplunkLogStoreTests.scala
index b149417563..e2bd8db792 100644
--- a/tests/src/test/scala/whisk/core/containerpool/logging/SplunkLogStoreTests.scala
+++ b/tests/src/test/scala/whisk/core/containerpool/logging/SplunkLogStoreTests.scala
@@ -70,7 +70,7 @@ class SplunkLogStoreTests
   val endTimePlus5 = "2007-12-03T10:15:50Z" //queried end time range is endTime+5
   val uuid = UUID()
   val user =
-    Identity(Subject(), Namespace(EntityName("testSpace"), uuid), BasicAuthenticationAuthKey(uuid, Secret()), Set())
+    Identity(Subject(), Namespace(EntityName("testSpace"), uuid), BasicAuthenticationAuthKey(uuid, Secret()), Set.empty)
   val request = HttpRequest(
     method = POST,
     uri = "https://some.url",
diff --git a/tests/src/test/scala/whisk/core/containerpool/logging/test/DockerToActivationLogStoreTests.scala b/tests/src/test/scala/whisk/core/containerpool/logging/test/DockerToActivationLogStoreTests.scala
index 2de354363f..542d1b1053 100644
--- a/tests/src/test/scala/whisk/core/containerpool/logging/test/DockerToActivationLogStoreTests.scala
+++ b/tests/src/test/scala/whisk/core/containerpool/logging/test/DockerToActivationLogStoreTests.scala
@@ -41,7 +41,7 @@ class DockerToActivationLogStoreTests extends FlatSpec with Matchers with WskAct
 
   val uuid = UUID()
   val user =
-    Identity(Subject(), Namespace(EntityName("testSpace"), uuid), BasicAuthenticationAuthKey(uuid, Secret()), Set())
+    Identity(Subject(), Namespace(EntityName("testSpace"), uuid), BasicAuthenticationAuthKey(uuid, Secret()), Set.empty)
   val exec = CodeExecAsString(RuntimeManifest("actionKind", ImageName("testImage")), "testCode", None)
   val action = ExecutableWhiskAction(user.namespace.name.toPath, EntityName("actionName"), exec)
   val activation =
diff --git a/tests/src/test/scala/whisk/core/containerpool/test/ContainerPoolTests.scala b/tests/src/test/scala/whisk/core/containerpool/test/ContainerPoolTests.scala
index 3de575d057..a9d4604627 100644
--- a/tests/src/test/scala/whisk/core/containerpool/test/ContainerPoolTests.scala
+++ b/tests/src/test/scala/whisk/core/containerpool/test/ContainerPoolTests.scala
@@ -76,7 +76,7 @@ class ContainerPoolTests
       TransactionId.testing,
       action.fullyQualifiedName(true),
       action.rev,
-      Identity(Subject(), Namespace(invocationNamespace, uuid), BasicAuthenticationAuthKey(uuid, Secret()), Set()),
+      Identity(Subject(), Namespace(invocationNamespace, uuid), BasicAuthenticationAuthKey(uuid, Secret()), Set.empty),
       ActivationId.generate(),
       ControllerInstanceId("0"),
       blocking = false,
diff --git a/tests/src/test/scala/whisk/core/containerpool/test/ContainerProxyTests.scala b/tests/src/test/scala/whisk/core/containerpool/test/ContainerProxyTests.scala
index 25b0303271..e635b5fcf5 100644
--- a/tests/src/test/scala/whisk/core/containerpool/test/ContainerProxyTests.scala
+++ b/tests/src/test/scala/whisk/core/containerpool/test/ContainerProxyTests.scala
@@ -85,7 +85,7 @@ class ContainerProxyTests
     messageTransId,
     action.fullyQualifiedName(true),
     action.rev,
-    Identity(Subject(), Namespace(invocationNamespace, uuid), BasicAuthenticationAuthKey(uuid, Secret()), Set()),
+    Identity(Subject(), Namespace(invocationNamespace, uuid), BasicAuthenticationAuthKey(uuid, Secret()), Set.empty),
     ActivationId.generate(),
     ControllerInstanceId("0"),
     blocking = false,
diff --git a/tests/src/test/scala/whisk/core/database/test/DocumentHandlerTests.scala b/tests/src/test/scala/whisk/core/database/test/DocumentHandlerTests.scala
index f4f7e273fa..e5765f7e7b 100644
--- a/tests/src/test/scala/whisk/core/database/test/DocumentHandlerTests.scala
+++ b/tests/src/test/scala/whisk/core/database/test/DocumentHandlerTests.scala
@@ -189,7 +189,7 @@ class DocumentHandlerTests extends FlatSpec with Matchers with ScalaFutures with
       Set("namespace", "name", "version", "publish", "annotations", "updated")
 
     intercept[UnsupportedView] {
-      WhisksHandler.fieldsRequiredForView("foo", "unknown") shouldBe Set()
+      WhisksHandler.fieldsRequiredForView("foo", "unknown") shouldBe Set.empty
     }
   }
 
diff --git a/tests/src/test/scala/whisk/core/invoker/test/NamespaceBlacklistTests.scala b/tests/src/test/scala/whisk/core/invoker/test/NamespaceBlacklistTests.scala
index 89afd07fda..033678cf2e 100644
--- a/tests/src/test/scala/whisk/core/invoker/test/NamespaceBlacklistTests.scala
+++ b/tests/src/test/scala/whisk/core/invoker/test/NamespaceBlacklistTests.scala
@@ -99,7 +99,7 @@ class NamespaceBlacklistTests
 
   def authToIdentities(auth: WhiskAuth): Set[Identity] = {
     auth.namespaces.map { ns =>
-      Identity(auth.subject, ns.namespace, ns.authkey, Set(), UserLimits())
+      Identity(auth.subject, ns.namespace, ns.authkey, Set.empty, UserLimits())
     }
   }
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services