vibhatha commented on code in PR #39777:
URL: https://github.com/apache/arrow/pull/39777#discussion_r1625272182


##########
java/memory/memory-core/src/main/java/org/apache/arrow/memory/util/HistoricalLog.java:
##########
@@ -80,14 +85,15 @@ public HistoricalLog(final int limit, final String 
idStringFormat, Object... arg
    * @param noteFormat {@link String#format} format string that describes the 
event
    * @param args       for the format string, or nothing if none are required
    */
-  public synchronized void recordEvent(final String noteFormat, Object... 
args) {
+  @FormatMethod
+  public synchronized void recordEvent(@FormatString final String noteFormat, 
Object... args) {
     final String note = String.format(noteFormat, args);
     final Event event = new Event(note);
     if (firstEvent == null) {
       firstEvent = event;
     }
     if (history.size() == limit) {
-      history.removeFirst();
+      history.remove(0);

Review Comment:
   Using `ArrayDeque` 



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