11"""
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.
33The Universal Permissive License (UPL), Version 1.0
44"""
55
@@ -117,7 +117,7 @@ def get_model_attribute_value(self, attribute_helper, attribute_name, wlst_value
117117 add_value = None
118118 mbean_string = attribute_helper .mbean_string ()
119119 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 ,
121121 class_name = _class_name , method_name = _method_name )
122122 else :
123123 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
130130 class_name = _class_name , method_name = _method_name )
131131 default_value = self .__get_default_value (attribute_helper , attribute_name )
132132 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 ))
133135 if is_empty (default_value ) or not self .is_default (model_value , model_type , default_value ):
134136 add_value = model_value
135137 if add_value is not None and model_type == alias_constants .PASSWORD :
136138 add_value = alias_constants .PASSWORD_TOKEN
137139
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)
141143
142144 return add_value
143145
@@ -149,6 +151,9 @@ def convert(self, value, value_type):
149151 :return: converted data type and value
150152 """
151153 _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 ]
152157 converted_type = None
153158 converted = None
154159 try :
@@ -183,7 +188,7 @@ def convert(self, value, value_type):
183188 converted_type = alias_constants .STRING
184189 if value is not None :
185190 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' :
187192 converted = create_array (value )
188193 if converted is not None :
189194 converted_type = alias_constants .JARRAY
0 commit comments