11"""
2- Copyright (c) 2017, 2018 , Oracle and/or its affiliates. All rights reserved.
2+ Copyright (c) 2017, 2019 , Oracle and/or its affiliates. All rights reserved.
33The Universal Permissive License (UPL), Version 1.0
44"""
55from java .lang import String
4343from wlsdeploy .aliases .alias_constants import RESTART_REQUIRED
4444from wlsdeploy .aliases .alias_constants import SET_MBEAN_TYPE
4545from wlsdeploy .aliases .alias_constants import SET_METHOD
46+ from wlsdeploy .aliases .alias_constants import STRING
4647from wlsdeploy .aliases .alias_constants import USES_PATH_TOKENS
4748from wlsdeploy .aliases .alias_constants import VALUE
4849from wlsdeploy .aliases .alias_constants import WLST_NAME
@@ -385,17 +386,21 @@ def get_wlst_attribute_name_and_value(self, location, model_attribute_name, mode
385386 raise ex
386387 else :
387388 if data_type in ALIAS_LIST_TYPES or data_type in ALIAS_MAP_TYPES :
389+ to_type = data_type
390+
388391 merge = True
389392 if MERGE in attribute_info :
390393 merge = alias_utils .convert_boolean (attribute_info [MERGE ])
391394
392- if merge and data_type in ALIAS_MAP_TYPES :
395+ if alias_utils .is_attribute_server_start_arguments (location , model_attribute_name ):
396+ # convert to string, even if no existing value to merge
397+ merged_value = \
398+ alias_utils .merge_server_start_argument_values (model_attribute_value , existing_wlst_value )
399+ to_type = STRING
400+ elif merge and data_type in ALIAS_MAP_TYPES :
393401 model_val = TypeUtils .convertToType (PROPERTIES , model_attribute_value )
394402 existing_val = TypeUtils .convertToType (PROPERTIES , existing_wlst_value )
395403 merged_value = alias_utils .merge_model_and_existing_properties (model_val , existing_val )
396- elif merge and alias_utils .is_attribute_server_start_arguments (location , model_attribute_name ):
397- merged_value = \
398- alias_utils .merge_server_start_argument_values (model_attribute_value , existing_wlst_value )
399404 elif merge and existing_wlst_value is not None and len (existing_wlst_value ) > 0 :
400405 model_val = alias_utils .convert_to_type (LIST , model_attribute_value ,
401406 delimiter = MODEL_LIST_DELIMITER )
@@ -412,10 +417,10 @@ def get_wlst_attribute_name_and_value(self, location, model_attribute_name, mode
412417 subtype = 'java.lang.String'
413418 if SET_MBEAN_TYPE in attribute_info :
414419 subtype = attribute_info [SET_MBEAN_TYPE ]
415- wlst_attribute_value = alias_utils .convert_to_type (data_type , merged_value , subtype = subtype ,
420+ wlst_attribute_value = alias_utils .convert_to_type (to_type , merged_value , subtype = subtype ,
416421 delimiter = MODEL_LIST_DELIMITER )
417422 else :
418- wlst_attribute_value = alias_utils .convert_to_type (data_type , merged_value ,
423+ wlst_attribute_value = alias_utils .convert_to_type (to_type , merged_value ,
419424 delimiter = MODEL_LIST_DELIMITER )
420425 else :
421426 wlst_attribute_value = alias_utils .convert_to_type (data_type , model_attribute_value ,
0 commit comments