Fix syntax error, update method header for new clazz param

This commit is contained in:
Ethan Katnic 2024-08-21 09:18:17 -07:00
parent f83f8c8e02
commit e6402773d6
2 changed files with 5 additions and 5 deletions

View file

@ -171,8 +171,9 @@ class AwsCredentialsProviderPropertyValueDecoder implements IPropertyValueDecode
* Attempts to construct an {@link AwsCredentialsProvider}. * Attempts to construct an {@link AwsCredentialsProvider}.
* *
* @param providerName Raw, unmodified provider name. Should there be an * @param providerName Raw, unmodified provider name. Should there be an
* Exeception during construction, this parameter will be logged. * Exception during construction, this parameter will be logged.
* @param constructor supplier-like function that will perform the construction * @param constructor supplier-like function that will perform the construction
* @param clazz the class to attempt to construct
* @return the constructed provider, if successful; otherwise, null * @return the constructed provider, if successful; otherwise, null
* *
* @param <T> type of the CredentialsProvider to construct * @param <T> type of the CredentialsProvider to construct
@ -192,9 +193,7 @@ class AwsCredentialsProviderPropertyValueDecoder implements IPropertyValueDecode
} else { } else {
log.warn("Found non-static create() method in {}", providerName); log.warn("Found non-static create() method in {}", providerName);
} }
} catch (NoSuchMethodException ignored) { } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e1) {
// Ignore if create() method is not found
} catch (IllegalAccessException | InvocationTargetException e1) {
log.warn("Exception thrown by create() method in {}", providerName, e1.getCause()); log.warn("Exception thrown by create() method in {}", providerName, e1.getCause());
} }
} catch (NoSuchMethodException ignored) { } catch (NoSuchMethodException ignored) {

View file

@ -280,7 +280,8 @@ public class MultiLangDaemonConfiguration {
ArrayConverter arrayConverter = new ArrayConverter(String[].class, new StringConverter()); ArrayConverter arrayConverter = new ArrayConverter(String[].class, new StringConverter());
arrayConverter.setDelimiter(','); arrayConverter.setDelimiter(',');
convertUtilsBean.register(arrayConverter, String[].class);AwsCredentialsProviderPropertyValueDecoder credentialsDecoder = convertUtilsBean.register(arrayConverter, String[].class);
AwsCredentialsProviderPropertyValueDecoder credentialsDecoder =
new AwsCredentialsProviderPropertyValueDecoder(); new AwsCredentialsProviderPropertyValueDecoder();
Function<String, ?> converter = credentialsDecoder::decodeValue; Function<String, ?> converter = credentialsDecoder::decodeValue;