Skip to content

Commit b56cde4

Browse files
authored
JIRA-WDT-564 - Allow Jython bool type in model content for deep copy and file write in WLS 14.1.2 (#909)
1 parent d14e55b commit b56cde4

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
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, 2020, Oracle Corporation and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2017, 2021, 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;
@@ -514,6 +514,7 @@ private static PyObject doDeepCopy(PyObject orig, PyObject memo) {
514514

515515
String typeName = origType.fastGetName();
516516
switch(typeName) {
517+
case "bool":
517518
case "float":
518519
case "int":
519520
case "long":

core/src/main/python/wlsdeploy/yaml/yaml_translator.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,10 @@ def _get_value_string(self, value):
242242
result = 'null'
243243
elif type(value) is int or type(value) is long or type(value) is float:
244244
result = str(value)
245+
elif type(value) is bool:
246+
result = 'false'
247+
if value:
248+
result = 'true'
245249
elif type(value) is list:
246250
new_value = '['
247251
for element in value:

0 commit comments

Comments
 (0)