jvz commented on code in PR #1961:
URL: https://github.com/apache/logging-log4j2/pull/1961#discussion_r1389983781


##########
log4j-api/src/main/java/org/apache/logging/log4j/util/LowLevelLogUtil.java:
##########
@@ -32,6 +32,7 @@
  */
 final class LowLevelLogUtil {
 
+    @SuppressWarnings("DefaultCharset")

Review Comment:
   Might be useful to leave a comment, too, that this is intentional 
functionality? Though I suppose the warning suppression sort of implies that.



##########
log4j-api/src/main/java/org/apache/logging/log4j/message/ReusableMessageFactory.java:
##########
@@ -30,6 +30,7 @@
  * @since 2.6
  */
 @PerformanceSensitive("allocation")
+@SuppressWarnings("ThreadLocalUsage")

Review Comment:
   Heh, this should end up getting removed once we finalize the recycler API!



##########
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:
   Oops, I think this was my bad.



-- 
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]

Reply via email to