You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by GitBox <gi...@apache.org> on 2019/01/09 04:07:11 UTC

[GitHub] dkuppitz commented on a change in pull request #1029: Updates the API within the core project.

dkuppitz commented on a change in pull request #1029: Updates the API within the core project.
URL: https://github.com/apache/tinkerpop/pull/1029#discussion_r246175700
 
 

 ##########
 File path: gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/EventStrategy.java
 ##########
 @@ -223,11 +223,7 @@ public void addEvent(final Event evt) {
      */
     public static class TransactionalEventQueue implements EventQueue {
 
-        private final ThreadLocal<Deque<Event>> eventQueue = new ThreadLocal<Deque<Event>>() {
-            protected Deque<Event> initialValue() {
-                return new ArrayDeque<>();
-            }
-        };
+        private final ThreadLocal<Deque<Event>> eventQueue = ThreadLocal.withInitial(() -> new ArrayDeque<>());
 
 Review comment:
   `ThreadLocal.withInitial(ArrayDeque::new)` to follow the previous patterns.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services