|
1 | 1 | """ |
2 | | -Copyright (c) 2020, 2022, Oracle Corporation and/or its affiliates. |
| 2 | +Copyright (c) 2020, 2024, Oracle and/or its affiliates. |
3 | 3 | Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. |
4 | 4 | """ |
5 | 5 | import java.io.IOException as IOException |
|
154 | 154 | MESSAGE = 'message' |
155 | 155 | ATTRIBUTE = 'attribute' |
156 | 156 |
|
| 157 | +LIST_TYPE_MATCH_EXCEPTIONS = [ |
| 158 | + # despite WLS methods with String[] signatures, these 4 attributes have to be set as Jython arrays. |
| 159 | + # their alias type needs to be `list`, so they are exempted from the exact type match |
| 160 | + '/Server/SingleSignOnServices/ServiceProviderSingleLogoutRedirectUri', |
| 161 | + '/Server/SingleSignOnServices/ServiceProviderSingleLogoutRedirectURIs', |
| 162 | + '/ServerTemplate/SingleSignOnServices/ServiceProviderSingleLogoutRedirectUri', |
| 163 | + '/ServerTemplate/SingleSignOnServices/ServiceProviderSingleLogoutRedirectURIs' |
| 164 | +] |
| 165 | + |
157 | 166 | _logger = PlatformLogger('test.aliases.verify') |
158 | 167 | CLASS_NAME = 'Verifier' |
159 | 168 |
|
@@ -1222,8 +1231,11 @@ def _check_complex_type(self, location, generated_attribute, generated_attr_info |
1222 | 1231 | self._alias_helper.get_wlst_read_type(location, model_name)): |
1223 | 1232 | valid = True |
1224 | 1233 | elif alias_type == alias_constants.LIST: |
1225 | | - if _is_of_type_with_get_required(generated_attribute, alias_type, generated_attr_info, |
1226 | | - get_required_attribute_list): |
| 1234 | + match_path = location.get_folder_path() + '/' + generated_attribute |
| 1235 | + if match_path in LIST_TYPE_MATCH_EXCEPTIONS: |
| 1236 | + valid = True |
| 1237 | + elif _is_of_type_with_get_required(generated_attribute, alias_type, generated_attr_info, |
| 1238 | + get_required_attribute_list): |
1227 | 1239 | valid = True |
1228 | 1240 | elif _is_of_type_with_lsa(generated_attribute, alias_type, generated_attr_info, |
1229 | 1241 | get_required_attribute_list): |
@@ -1274,7 +1286,7 @@ def _is_valid_alias_property_type(self, location, attribute, attr_info, alias_ty |
1274 | 1286 | attr_type = _is_attribute_type_for_get_required(get_type, cmo_type) |
1275 | 1287 | if attr_type != alias_constants.PROPERTIES: |
1276 | 1288 | self._add_invalid_type_error(location, attribute, attr_type, alias_type, |
1277 | | - 'Alias has GET with wrong type') |
| 1289 | + get_required_attribute_list, 'Alias has GET with wrong type') |
1278 | 1290 | elif _is_any_string_type(attr_info) and self._alias_helper.get_wlst_read_type(location, model_name) == \ |
1279 | 1291 | alias_constants.SEMI_COLON_DELIMITED_STRING: |
1280 | 1292 | _logger.finest('Attribute {0} is string type and WLST read type is a delimited string type', attribute, |
|
0 commit comments