From 32a23dd5ec3bd227c38fe14518494856e094fae3 Mon Sep 17 00:00:00 2001 From: kenji yoshida <6b656e6a69@gmail.com> Date: Wed, 8 Nov 2017 12:04:36 +0900 Subject: [PATCH] fix deprecation warning in project/MultiNode.scala (#23941) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ``` project/MultiNode.scala:46:12: method unapplySeq in class Regex is deprecated (since 2.11.0): extracting a match result from anything but a CharSequence or Match is deprecated [warn] case MultinodeJvmArgs(a, b) ⇒ [warn] ^ ``` - https://github.com/scala/scala/blob/v2.12.4/src/library/scala/util/matching/Regex.scala#L340 - https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html `System.getProperties.propertyNames.asScala.toList` return `List[Any]` --- project/MultiNode.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/MultiNode.scala b/project/MultiNode.scala index 93b04aa757..59a9709e91 100644 --- a/project/MultiNode.scala +++ b/project/MultiNode.scala @@ -42,7 +42,7 @@ object MultiNode extends AutoPlugin { // -DMultiJvm.akka.cluster.Stress.nrOfNodes=15 val MultinodeJvmArgs = "multinode\\.(D|X)(.*)".r val knownPrefix = Set("multnode.", "akka.", "MultiJvm.") - val akkaProperties = System.getProperties.propertyNames.asScala.toList.collect { + val akkaProperties = System.getProperties.stringPropertyNames.asScala.toList.collect { case MultinodeJvmArgs(a, b) ⇒ val value = System.getProperty("multinode." + a + b) "-" + a + b + (if (value == "") "" else "=" + value)