ppkarwasz commented on code in PR #1961:
URL: https://github.com/apache/logging-log4j2/pull/1961#discussion_r1389993455
##########
log4j-api/src/main/java/org/apache/logging/log4j/util/PropertySource.java:
##########
@@ -137,9 +137,12 @@ final class Util {
* @param value property name
* @return the property broken into lower case tokens
*/
+ // https://errorprone.info/bugpattern/CollectionUndefinedEquality
+ @SuppressWarnings("CollectionUndefinedEquality")
public static List<CharSequence> tokenize(final CharSequence value) {
- if (CACHE.containsKey(value)) {
- return CACHE.get(value);
+ // `value` should be a `String`
+ if (CACHE.containsKey(value.toString())) {
+ return CACHE.get(value.toString());
Review Comment:
I noticed this before, but the method is only called with `String`
parameters, so it is not actually a problem.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]