do not use Collections.emptyList()

This commit is contained in:
David Blacka 2023-07-23 23:45:47 -04:00
parent e322186112
commit 69a0a34239
3 changed files with 6 additions and 6 deletions

View File

@ -184,11 +184,11 @@ public class SignKeyset extends CLBase {
private static List<DnsKeyPair> getKeys(String[] keyfiles, int startIndex,
File inDirectory) throws IOException {
if (keyfiles == null)
return Collections.emptyList();
return new ArrayList<>();
int len = keyfiles.length - startIndex;
if (len <= 0)
return Collections.emptyList();
return new ArrayList<>();
ArrayList<DnsKeyPair> keys = new ArrayList<>(len);

View File

@ -191,11 +191,11 @@ public class SignRRset extends CLBase {
private static List<DnsKeyPair> getKeys(String[] keyfiles, int startIndex,
File inDirectory) throws IOException {
if (keyfiles == null)
return Collections.emptyList();
return new ArrayList<>();
int len = keyfiles.length - startIndex;
if (len <= 0)
return Collections.emptyList();
return new ArrayList<>();
ArrayList<DnsKeyPair> keys = new ArrayList<>(len);

View File

@ -331,11 +331,11 @@ public class SignZone extends CLBase {
private static List<DnsKeyPair> getKeys(String[] keyfiles, int startIndex,
File inDirectory) throws IOException {
if (keyfiles == null)
return Collections.emptyList();
return new ArrayList<>();
int len = keyfiles.length - startIndex;
if (len <= 0)
return Collections.emptyList();
return new ArrayList<>();
ArrayList<DnsKeyPair> keys = new ArrayList<>(len);