Skip to content

Commit 310a2aa

Browse files
authored
JIRA-WDT-391 Fix ordered dictionary to completely delete keys; use delete in variable substitution (#533)
1 parent 2e63d60 commit 310a2aa

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

core/src/main/java/oracle/weblogic/deploy/util/PyOrderedDict.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017, 2019, Oracle Corporation and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2017, 2020, Oracle Corporation and/or its affiliates. All rights reserved.
33
* Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
44
*/
55
package oracle.weblogic.deploy.util;
@@ -203,6 +203,7 @@ public void __delitem__(PyObject key) {
203203
throw Py.KeyError(key.toString());
204204
}
205205
}
206+
super.__delitem__(key);
206207
}
207208

208209
/**

core/src/main/python/wlsdeploy/util/variables.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def _process_node(nodes, variables, model_context):
188188
# if the key changes with substitution, remove old key and map value to new key
189189
new_key = _substitute(key, variables, model_context)
190190
if new_key is not key:
191-
nodes.pop(key)
191+
del nodes[key]
192192
nodes[new_key] = value
193193

194194
if isinstance(value, dict):

0 commit comments

Comments
 (0)