pmouawad commented on a change in pull request #669:
URL: https://github.com/apache/jmeter/pull/669#discussion_r775908487



##########
File path: 
src/core/src/main/java/org/apache/jmeter/util/keystore/JmeterKeyStore.java
##########
@@ -303,36 +323,60 @@ private boolean isIndexInConfiguredRange(int index) {
      * @throws IllegalArgumentException if {@link #clientCertAliasVarName}
      *                                  is not empty and no key for this alias 
could be found
      */
-    public String getAlias() {
+    public String getAlias(String [] keyTypes) {
+
+        for (String keyType : keyTypes) {
+
+            String alias = getAlias(keyType);
+            if (alias != null) { return alias; }
+
+        }
+
+        return null;
+
+    }
+
+    /**
+     * Get the next, only or null alias for the specified key type.
+     *
+     * @param keyType key type that the key under the alias must have
+     * @return the next, only, or null alias
+     */
+    public String getAlias(String keyType) {

Review comment:
       Same here regarding use of Optional




-- 
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.

To unsubscribe, e-mail: [email protected]

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


Reply via email to