You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "vy (via GitHub)" <gi...@apache.org> on 2023/02/02 14:31:53 UTC

[GitHub] [logging-log4j2] vy commented on a diff in pull request #1194: Migrate Recycler API to log4j-api

vy commented on code in PR #1194:
URL: https://github.com/apache/logging-log4j2/pull/1194#discussion_r1094607530


##########
log4j-api/src/main/java/org/apache/logging/log4j/message/ReusableMessageFactory.java:
##########
@@ -89,9 +83,21 @@ public static void release(final Message message) { // LOG4J2-1583
         }
     }
 
+    @Override
+    public void recycle(final Message message) {

Review Comment:
   `release` javadoc states the following
   
   > This flag is used internally to verify that a reusable message is no longer in use and can be reused.
   
   This sounds to me exactly like what recycle does. I am curious why do we need separate `recycle()` and `release()` methods. Can't we simply move the `recycle()` logic to the bottom of the `release()`?



-- 
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: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org