From 8e55e50fd99e06ce9ad0b007734008af31d9b7b0 Mon Sep 17 00:00:00 2001 From: Jeroen van Erp Date: Mon, 21 Mar 2016 10:15:47 +0100 Subject: [PATCH] Fixed some Java7 warnings --- src/main/java/net/schmizz/sshj/SSHClient.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/net/schmizz/sshj/SSHClient.java b/src/main/java/net/schmizz/sshj/SSHClient.java index ac04ec73..da0c00b7 100644 --- a/src/main/java/net/schmizz/sshj/SSHClient.java +++ b/src/main/java/net/schmizz/sshj/SSHClient.java @@ -221,7 +221,7 @@ public class SSHClient public void auth(String username, Iterable methods) throws UserAuthException, TransportException { checkConnected(); - final Deque savedEx = new LinkedList(); + final Deque savedEx = new LinkedList<>(); for (AuthMethod method: methods) { try { if (auth.authenticate(username, (Service) conn, method, trans.getTimeoutMs())) @@ -342,7 +342,7 @@ public class SSHClient */ public void authPublickey(String username, Iterable keyProviders) throws UserAuthException, TransportException { - final List am = new LinkedList(); + final List am = new LinkedList<>(); for (KeyProvider kp : keyProviders) am.add(new AuthPublickey(kp)); auth(username, am); @@ -385,7 +385,7 @@ public class SSHClient */ public void authPublickey(String username, String... locations) throws UserAuthException, TransportException { - final List keyProviders = new LinkedList(); + final List keyProviders = new LinkedList<>(); for (String loc : locations) { try { log.debug("Attempting to load key from: {}", loc); @@ -415,7 +415,7 @@ public class SSHClient public void authGssApiWithMic(String username, LoginContext context, Oid supportedOid, Oid... supportedOids) throws UserAuthException, TransportException { // insert supportedOid to the front of the list since ordering matters - List oids = new ArrayList(Arrays.asList(supportedOids)); + List oids = new ArrayList<>(Arrays.asList(supportedOids)); oids.add(0, supportedOid); auth(username, new AuthGssApiWithMic(context, oids));