lgoldstein commented on a change in pull request #183:
URL: https://github.com/apache/mina-sshd/pull/183#discussion_r599677422



##########
File path: 
sshd-core/src/main/java/org/apache/sshd/client/auth/pubkey/UserAuthPublicKey.java
##########
@@ -56,6 +58,7 @@
     protected Iterator<PublicKeyIdentity> keys;
     protected PublicKeyIdentity current;
     protected List<NamedFactory<Signature>> factories;
+    protected List<String> currentAlgorithms = new LinkedList<>();

Review comment:
       A `LinkedList` is not really a `List` and any attempt to use it as such 
for random access has horrible performance (true for large lists but let's not 
quibble). Since the code only handles the "edges" (head/tail) I re commend 
defining it as
   ```java
   Deque<String> currentAlgorithms = new LinkedList<>();
   ```
   and the you can use `removeHead/addTail`/etc. And since `Deque extends 
Collection` you can also use it as such.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to