Repository: mina-sshd
Updated Branches:
  refs/heads/master 241551793 -> fad77cd31


[SSHD-698] Added some generics definitions though not strictly required due to 
Eclipse shortcomings


Project: http://git-wip-us.apache.org/repos/asf/mina-sshd/repo
Commit: http://git-wip-us.apache.org/repos/asf/mina-sshd/commit/f560959a
Tree: http://git-wip-us.apache.org/repos/asf/mina-sshd/tree/f560959a
Diff: http://git-wip-us.apache.org/repos/asf/mina-sshd/diff/f560959a

Branch: refs/heads/master
Commit: f560959af5e928d083da7603ab84b21ff796f46a
Parents: 2415517
Author: Lyor Goldstein <lyor.goldst...@gmail.com>
Authored: Fri Sep 16 18:15:33 2016 +0300
Committer: Lyor Goldstein <lyor.goldst...@gmail.com>
Committed: Fri Sep 16 18:15:33 2016 +0300

----------------------------------------------------------------------
 .../sshd/client/auth/password/PasswordIdentityProvider.java     | 5 ++++-
 .../org/apache/sshd/common/keyprovider/KeyIdentityProvider.java | 5 ++++-
 .../src/main/java/org/apache/sshd/common/util/GenericUtils.java | 2 +-
 3 files changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/f560959a/sshd-core/src/main/java/org/apache/sshd/client/auth/password/PasswordIdentityProvider.java
----------------------------------------------------------------------
diff --git 
a/sshd-core/src/main/java/org/apache/sshd/client/auth/password/PasswordIdentityProvider.java
 
b/sshd-core/src/main/java/org/apache/sshd/client/auth/password/PasswordIdentityProvider.java
index 268779c..3c428cb 100644
--- 
a/sshd-core/src/main/java/org/apache/sshd/client/auth/password/PasswordIdentityProvider.java
+++ 
b/sshd-core/src/main/java/org/apache/sshd/client/auth/password/PasswordIdentityProvider.java
@@ -22,6 +22,7 @@ package org.apache.sshd.client.auth.password;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.Iterator;
+import java.util.function.Supplier;
 
 import org.apache.sshd.client.session.ClientSession;
 import org.apache.sshd.common.util.GenericUtils;
@@ -205,7 +206,9 @@ public interface PasswordIdentityProvider {
      * @return The wrapping iterable
      */
     static Iterable<String> iterableOf(Collection<? extends 
PasswordIdentityProvider> providers) {
-        return 
GenericUtils.multiIterableSuppliers(GenericUtils.wrapIterable(providers, p -> 
p::loadPasswords));
+        Iterable<Supplier<Iterable<String>>> passwordSuppliers =
+                GenericUtils.<PasswordIdentityProvider, 
Supplier<Iterable<String>>>wrapIterable(providers, p -> p::loadPasswords);
+        return GenericUtils.multiIterableSuppliers(passwordSuppliers);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/f560959a/sshd-core/src/main/java/org/apache/sshd/common/keyprovider/KeyIdentityProvider.java
----------------------------------------------------------------------
diff --git 
a/sshd-core/src/main/java/org/apache/sshd/common/keyprovider/KeyIdentityProvider.java
 
b/sshd-core/src/main/java/org/apache/sshd/common/keyprovider/KeyIdentityProvider.java
index b696acf..0e809f9 100644
--- 
a/sshd-core/src/main/java/org/apache/sshd/common/keyprovider/KeyIdentityProvider.java
+++ 
b/sshd-core/src/main/java/org/apache/sshd/common/keyprovider/KeyIdentityProvider.java
@@ -23,6 +23,7 @@ import java.security.KeyPair;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.Iterator;
+import java.util.function.Supplier;
 
 import org.apache.sshd.client.session.ClientSession;
 import org.apache.sshd.common.util.GenericUtils;
@@ -209,7 +210,9 @@ public interface KeyIdentityProvider {
      * @return The wrapping iterable
      */
     static Iterable<KeyPair> iterableOf(Collection<? extends 
KeyIdentityProvider> providers) {
-        return 
GenericUtils.multiIterableSuppliers(GenericUtils.wrapIterable(providers, p -> 
p::loadKeys));
+        Iterable<Supplier<Iterable<KeyPair>>> keysSuppliers =
+                GenericUtils.<KeyIdentityProvider, 
Supplier<Iterable<KeyPair>>>wrapIterable(providers, p -> p::loadKeys);
+        return GenericUtils.multiIterableSuppliers(keysSuppliers);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/f560959a/sshd-core/src/main/java/org/apache/sshd/common/util/GenericUtils.java
----------------------------------------------------------------------
diff --git 
a/sshd-core/src/main/java/org/apache/sshd/common/util/GenericUtils.java 
b/sshd-core/src/main/java/org/apache/sshd/common/util/GenericUtils.java
index b8a04d1..07928ae 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/util/GenericUtils.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/util/GenericUtils.java
@@ -696,7 +696,7 @@ public final class GenericUtils {
      * @param providers The providers - ignored if {@code null} (i.e., return 
an empty iterable instance)
      * @return The wrapping instance
      */
-    public static <T> Iterable<T> multiIterableSuppliers(final Iterable<? 
extends Supplier<? extends Iterable<? extends T>>> providers) {
+    public static <T> Iterable<T> multiIterableSuppliers(Iterable<? extends 
Supplier<? extends Iterable<? extends T>>> providers) {
         return (providers == null) ? Collections.emptyList() : () -> new 
Iterator<T>() {
             private final Iterator<? extends Supplier<? extends Iterable<? 
extends T>>> iter = iteratorOf(providers);
             private Iterator<? extends T> current = nextIterator();

Reply via email to