mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8272863: Replace usages of Collections.sort with List.sort call in public java modules
Reviewed-by: serb, dfuchs, naoto
This commit is contained in:
parent
fe7d70886c
commit
d732c3091f
10 changed files with 19 additions and 27 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -63,7 +63,6 @@
|
|||
|
||||
package java.lang;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
final class ProcessEnvironment extends HashMap<String,String>
|
||||
|
@ -301,7 +300,7 @@ final class ProcessEnvironment extends HashMap<String,String>
|
|||
String toEnvironmentBlock() {
|
||||
// Sort Unicode-case-insensitively by name
|
||||
List<Map.Entry<String,String>> list = new ArrayList<>(entrySet());
|
||||
Collections.sort(list, entryComparator);
|
||||
list.sort(entryComparator);
|
||||
|
||||
StringBuilder sb = new StringBuilder(size()*30);
|
||||
int cmp = -1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue