Skip to content

Commit 2e66035

Browse files
committed
Copy should be a copy
1 parent ab68d8b commit 2e66035

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

java/server/src/org/openqa/grid/internal/NewSessionRequestQueue.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,8 @@ public synchronized void processQueue(
6262
Predicate<RequestHandler> handlerConsumer,
6363
Prioritizer prioritizer) {
6464

65-
List<RequestHandler> copy = newSessionRequests;
65+
List<RequestHandler> copy = new ArrayList<>(newSessionRequests);
6666
if (prioritizer != null) {
67-
copy = new ArrayList<>(newSessionRequests);
6867
copy.sort((a,b) -> prioritizer.compareTo(
6968
a.getRequest().getDesiredCapabilities(), b.getRequest().getDesiredCapabilities()));
7069
}

0 commit comments

Comments
 (0)