Skip to content

Commit 862b031

Browse files
Merge branch 'master' into Issue#96-online-discover-domain
2 parents 5e9e887 + a482d0b commit 862b031

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

core/src/main/python/wlsdeploy/aliases/alias_utils.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ def is_attribute_server_start_arguments(location, model_attribute_name):
555555
:return: True if so, False otherwise
556556
"""
557557
return location.get_folder_path() == _server_start_location_folder_path and \
558-
model_attribute_name == _server_start_argument_attribute_name
558+
model_attribute_name == _server_start_argument_attribute_name
559559

560560

561561
def compute_delimiter_from_data_type(data_type, value):
@@ -631,6 +631,8 @@ def convert_to_type(data_type, value, subtype=None, delimiter=None):
631631
Convert the value to the specified type.
632632
:param data_type: the type
633633
:param value: the value
634+
:param subtype: optional subtype for jarray type
635+
:param delimiter: optional delimiter to use for parsing
634636
:return: the value converted to the specified type
635637
"""
636638
_method_name = 'convert_to_type'
@@ -652,14 +654,13 @@ def convert_to_type(data_type, value, subtype=None, delimiter=None):
652654
_logger.throwing(ex, class_name=_class_name, method_name=_method_name)
653655
raise ex
654656

655-
if new_value is not None:
656-
_logger.warning('data type {0} value {1}', data_type, new_value)
657+
try:
657658
if data_type == LONG:
658659
new_value = Long(new_value)
659660
elif data_type == JAVA_LANG_BOOLEAN:
660661
new_value = Boolean(new_value)
661662
elif data_type == JARRAY:
662-
if subtype == 'java.lang.String':
663+
if subtype is None or subtype == 'java.lang.String':
663664
new_value = _create_string_array(new_value)
664665
else:
665666
new_value = _create_mbean_array(new_value, subtype)
@@ -676,6 +677,10 @@ def convert_to_type(data_type, value, subtype=None, delimiter=None):
676677
#
677678
delimiter = compute_delimiter_from_data_type(data_type, new_value)
678679
new_value = delimiter.join(new_value)
680+
except TypeError, te:
681+
ex = exception_helper.create_alias_exception('WLSDPLY-08021', value, data_type, delimiter, te)
682+
_logger.throwing(ex, class_name=_class_name, method_name=_method_name)
683+
raise ex
679684

680685
return new_value
681686

0 commit comments

Comments
 (0)