rgoers commented on a change in pull request #338: use 'final' modifier for
fields where possible
URL: https://github.com/apache/logging-log4j2/pull/338#discussion_r374413039
##########
File path:
log4j-api/src/main/java/org/apache/logging/log4j/message/ParameterizedMessage.java
##########
@@ -69,10 +69,10 @@
private static final int HASHVAL = 31;
// storing JDK classes in ThreadLocals does not cause memory leaks in web
apps, so this is okay
- private static ThreadLocal<StringBuilder> threadLocalStringBuilder = new
ThreadLocal<>();
+ private static final ThreadLocal<StringBuilder> threadLocalStringBuilder =
new ThreadLocal<>();
private String messagePattern;
- private transient Object[] argArray;
+ private final transient Object[] argArray;
Review comment:
I don't believe transient fields should be marked final.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services