1
1
"""
2
- Copyright (c) 2019, 2020 , Oracle Corporation and/or its affiliates. All rights reserved.
2
+ Copyright (c) 2019, 2022 , Oracle Corporation and/or its affiliates.
3
3
The Universal Permissive License (UPL), Version 1.0
4
4
"""
5
5
@@ -117,7 +117,7 @@ def get_model_attribute_value(self, attribute_helper, attribute_name, wlst_value
117
117
add_value = None
118
118
mbean_string = attribute_helper .mbean_string ()
119
119
if attribute_helper .is_read_only (attribute_name ):
120
- _logger .finer ('WLDSPLY -06776' , mbean_string , attribute_name ,
120
+ _logger .finer ('WLSDPLY -06776' , mbean_string , attribute_name ,
121
121
class_name = _class_name , method_name = _method_name )
122
122
else :
123
123
model_type , model_value = self .__convert_to_type (attribute_helper , attribute_name , wlst_value )
@@ -130,14 +130,16 @@ def get_model_attribute_value(self, attribute_helper, attribute_name, wlst_value
130
130
class_name = _class_name , method_name = _method_name )
131
131
default_value = self .__get_default_value (attribute_helper , attribute_name )
132
132
if not is_empty (model_value ):
133
+ if not is_empty (default_value ):
134
+ converted_type , default_value = self .convert (default_value , type (default_value ))
133
135
if is_empty (default_value ) or not self .is_default (model_value , model_type , default_value ):
134
136
add_value = model_value
135
137
if add_value is not None and model_type == alias_constants .PASSWORD :
136
138
add_value = alias_constants .PASSWORD_TOKEN
137
139
138
- else :
139
- _logger .finer ('WLSDPLY-06771' , mbean_string , attribute_name , attribute_helper .get_type (attribute_name ),
140
- class_name = _class_name , method_name = _method_name )
140
+ # else:
141
+ # _logger.finer('WLSDPLY-06771', mbean_string, attribute_name, attribute_helper.get_type(attribute_name),
142
+ # class_name=_class_name, method_name=_method_name)
141
143
142
144
return add_value
143
145
@@ -149,6 +151,9 @@ def convert(self, value, value_type):
149
151
:return: converted data type and value
150
152
"""
151
153
_method_name = 'convert_method'
154
+ if str (value_type ).startswith ('<type ' ):
155
+ # strip off type, introduced in 14.1.1
156
+ value_type = str (value_type )[7 :- 2 ]
152
157
converted_type = None
153
158
converted = None
154
159
try :
@@ -183,7 +188,7 @@ def convert(self, value, value_type):
183
188
converted_type = alias_constants .STRING
184
189
if value is not None :
185
190
converted = value .toString ()
186
- elif value_type == 'PyArray' or value_type .startswith ('[L' ):
191
+ elif value_type == 'PyArray' or value_type .startswith ('[L' ) or value_type == 'array.array' :
187
192
converted = create_array (value )
188
193
if converted is not None :
189
194
converted_type = alias_constants .JARRAY
0 commit comments