Return new generatedKeyPair in loadKeys of testtool
[netconf.git] / netconf / tools / netconf-testtool / src / main / java / org / opendaylight / netconf / test / tool / VirtualKeyPairProvider.java
index f9238e2e7f10d4663b8d6b75fc02e2330726e148..4d389f73b77e97ce447e24afa41aa06546d3fccb 100644 (file)
@@ -71,10 +71,8 @@ public class VirtualKeyPairProvider implements KeyPairProvider {
                         algorithm, keySpecification, keySize, exception);
                 throw new IllegalArgumentException("An error occurred during generation of a new ke pair.", exception);
             }
-        } else {
-            return Collections.singleton(generatedKeyPair);
         }
-        return Collections.emptyList();
+        return Collections.singleton(generatedKeyPair);
     }
 
     /**