Skip to content
Permalink
Browse files
8275241: Unused ArrayList is created in RequestEngine.addHooks
Reviewed-by: egahlin
  • Loading branch information
turbanoff authored and egahlin committed Nov 29, 2021
1 parent 72bacf8 commit 37de442269e8c14e0a112e26a8cbb63e12dec9e7
Showing 1 changed file with 0 additions and 3 deletions.
@@ -28,7 +28,6 @@
import java.security.AccessControlContext;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
@@ -162,10 +161,8 @@ public static boolean removeHook(Runnable hook) {
// Only to be used for JVM events. No access control contest
// or check if hook already exists
static void addHooks(List<RequestHook> newEntries) {
List<RequestHook> addEntries = new ArrayList<>();
for (RequestHook rh : newEntries) {
rh.type.setEventHook(true);
addEntries.add(rh);
logHook("Added", rh.type);
}
entries.addAll(newEntries);

1 comment on commit 37de442

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 37de442 Nov 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.