Repository: mina-sshd Updated Branches: refs/heads/eddsa [created] 303501b2d
[SSHD-732] Fixed BuiltinClientIdentitiesWatcherTest in view Project: http://git-wip-us.apache.org/repos/asf/mina-sshd/repo Commit: http://git-wip-us.apache.org/repos/asf/mina-sshd/commit/9043b60f Tree: http://git-wip-us.apache.org/repos/asf/mina-sshd/tree/9043b60f Diff: http://git-wip-us.apache.org/repos/asf/mina-sshd/diff/9043b60f Branch: refs/heads/eddsa Commit: 9043b60f5a4237c9c1da06e9d7cbb85c746d29dc Parents: be51bdc Author: Lyor Goldstein <lyor.goldst...@gmail.com> Authored: Tue Mar 21 06:49:16 2017 +0200 Committer: Lyor Goldstein <lyor.goldst...@gmail.com> Committed: Tue Mar 21 06:49:42 2017 +0200 ---------------------------------------------------------------------- .../config/keys/BuiltinClientIdentitiesWatcherTest.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/9043b60f/sshd-core/src/test/java/org/apache/sshd/client/config/keys/BuiltinClientIdentitiesWatcherTest.java ---------------------------------------------------------------------- diff --git a/sshd-core/src/test/java/org/apache/sshd/client/config/keys/BuiltinClientIdentitiesWatcherTest.java b/sshd-core/src/test/java/org/apache/sshd/client/config/keys/BuiltinClientIdentitiesWatcherTest.java index 9599684..70cc197 100644 --- a/sshd-core/src/test/java/org/apache/sshd/client/config/keys/BuiltinClientIdentitiesWatcherTest.java +++ b/sshd-core/src/test/java/org/apache/sshd/client/config/keys/BuiltinClientIdentitiesWatcherTest.java @@ -28,6 +28,7 @@ import java.nio.file.Path; import java.nio.file.StandardOpenOption; import java.security.GeneralSecurityException; import java.security.KeyPair; +import java.util.ArrayList; import java.util.Collection; import java.util.Date; import java.util.EnumMap; @@ -141,7 +142,11 @@ public class BuiltinClientIdentitiesWatcherTest extends BaseTestSupport { } private static void testMultipleFilesWatch(String phase, KeyIdentityProvider watcher, Collection<? extends KeyPair> expected) { - Collection<? extends KeyPair> actual = (Collection<? extends KeyPair>) watcher.loadKeys(); + Iterable<KeyPair> keys = watcher.loadKeys(); + Collection<KeyPair> actual = new ArrayList<>(); + for (KeyPair kp : keys) { + actual.add(kp); + } assertEquals(phase + ": mismatched sizes", GenericUtils.size(expected), GenericUtils.size(actual)); if (!GenericUtils.isEmpty(expected)) {