Skip to content

Commit 10c1cae

Browse files
committed
- Fixed an issue with missed config keys while iterating through them on Scala 2.13.x
1 parent 20f7d98 commit 10c1cae

File tree

1 file changed

+4
-2
lines changed
  • common/scala/src/main/scala/org/apache/openwhisk/common

1 file changed

+4
-2
lines changed

common/scala/src/main/scala/org/apache/openwhisk/common/Config.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,9 @@ object Config {
141141
*/
142142
def readPropertiesFromSystemAndEnv(properties: scala.collection.mutable.Map[String, String],
143143
env: Map[String, String])(implicit logging: Logging) = {
144+
val keys: Seq[String] = properties.keys.toSeq
144145
readPropertiesFromSystem(properties)
145-
for (p <- properties.keys) {
146+
for (p <- keys) {
146147
val envp = p.replace('.', '_').toUpperCase
147148
val envv = env.get(envp)
148149
if (envv.isDefined) {
@@ -153,7 +154,8 @@ object Config {
153154
}
154155

155156
def readPropertiesFromSystem(properties: scala.collection.mutable.Map[String, String])(implicit logging: Logging) = {
156-
for (p <- properties.keys) {
157+
val keys: Seq[String] = properties.keys.toSeq
158+
for (p <- keys) {
157159
val sysv = Option(System.getProperty(prefix + p))
158160
if (sysv.isDefined) {
159161
logging.info(this, s"system set value for $p")

0 commit comments

Comments
 (0)