vy opened a new issue, #1380:
URL: https://github.com/apache/logging-log4j2/issues/1380

   `StackTraceStringResolver` contains the following lines:
   
   ```
   @Override
   public void resolve(
           final Throwable throwable,
           final JsonWriter jsonWriter) {
       final TruncatingBufferedPrintWriter srcWriter = 
srcWriterRecycler.acquire();
       try {
           throwable.printStackTrace(srcWriter);
           final TruncatingBufferedPrintWriter dstWriter = truncate(srcWriter);
           jsonWriter.writeString(dstWriter);
       } finally {
           srcWriterRecycler.release(srcWriter);
       }
   }
   
   private TruncatingBufferedPrintWriter truncate(
           final TruncatingBufferedPrintWriter srcWriter) {
   
       // ...
   
       // Allocate temporary buffers and truncate the input.
       final TruncatingBufferedPrintWriter dstWriter =
               dstWriterRecycler.acquire();
       try {
           // ...
       } finally {
           dstWriterRecycler.release(dstWriter);
       }
       return dstWriter;
   
   }
   ```
   
   `dstWriter` created in `truncate()` recycled there, though used in 
`resolve()` later on.


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