8272863: Replace usages of Collections.sort with List.sort call in public java modules

Reviewed-by: serb, dfuchs, naoto
This commit is contained in:
Andrey Turbanov 2021-08-26 20:47:02 +00:00 committed by Sergey Bylokhov
parent fe7d70886c
commit d732c3091f
10 changed files with 19 additions and 27 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 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
@ -198,7 +198,7 @@ public class FileURLConnection extends URLConnection {
throw new FileNotFoundException(filename);
}
Collections.sort(files, Collator.getInstance());
files.sort(Collator.getInstance());
for (int i = 0 ; i < files.size() ; i++) {
String fileName = files.get(i);

View file

@ -239,7 +239,7 @@ class PKIX {
if (stores == null) {
// reorder CertStores so that local CertStores are tried first
stores = new ArrayList<>(params.getCertStores());
Collections.sort(stores, new CertStoreComparator());
stores.sort(new CertStoreComparator());
}
return stores;
}