[
https://issues.apache.org/jira/browse/LOG4J2-2943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17212594#comment-17212594
]
Ralph Goers commented on LOG4J2-2943:
-------------------------------------
I am confused. I am assuming LOG4J-2943 is this issue. It can't be a duplicate
of itself.
> Exception in Log4j2CloudConfigLoggingSystem
> -------------------------------------------
>
> Key: LOG4J2-2943
> URL: https://issues.apache.org/jira/browse/LOG4J2-2943
> Project: Log4j 2
> Issue Type: Bug
> Components: Spring
> Affects Versions: 2.13.3
> Environment: This code was called in dockerized springboot
> application so environment recreating is not easy, but error seems to be
> pretty obvious.
> Reporter: RafaĆ Figas
> Priority: Major
>
> Exception is thrown at line 92 of class Log4j2CloudConfigLoggingSystem.
> Reason is pretty simple:
> {noformat}
> String location =
> props.getStringProperty(ConfigurationFactory.CONFIGURATION_FILE_PROPERTY);
> if (location != null) {
> List<String> list =
> Arrays.asList(super.getStandardConfigLocations());
> list.add(location);
> locations = list.toArray(new String[0]);
> }
> {noformat}
> Method {{Arrays.asList()}} returns *fixed size list*, so the next line call
> {{list.add(location);}} causes exception:
> java.lang.UnsupportedOperationException: null
> at java.util.AbstractList.add(AbstractList.java:148) ~[?:1.8.0_265]
> at java.util.AbstractList.add(AbstractList.java:108) ~[?:1.8.0_265]
> at
> org.apache.logging.log4j.spring.cloud.config.client.Log4j2CloudConfigLoggingSystem.getStandardConfigLocations(Log4j2CloudConfigLoggingSystem.java:92)
> ~[log4j-spring-cloud-config-client-2.13.3.jar:2.13.3]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)