public static KeyStoreFileType fromPropertyValueOrFileName(String propertyValue,
    String filename) {
    KeyStoreFileType result = KeyStoreFileType.fromPropertyValue(propertyValue);
    if (result == null) {
      result = KeyStoreFileType.fromFilename(filename);
    }
    return result;
  }
If <code>propertyValue</code> is not null or empty, returns the result of
<code>KeyStoreFileType.fromPropertyValue(propertyValue)</code>. Else, returns the result of
<code>KeyStoreFileType.fromFileName(filename)</code>.
@param propertyValue property value describing the KeyStoreFileType, or null/empty to
                     auto-detect the type from the file name.
@param filename      file name of the key store file. The file extension is used to auto-detect
                     the KeyStoreFileType when <code>propertyValue</code> is null or empty.
@return a KeyStoreFileType.
@throws IllegalArgumentException if <code>propertyValue</code> is not one of "JKS", "PEM",
                                 "PKCS12", "BCFKS", or empty/null.
@throws IllegalArgumentException if <code>propertyValue</code>is empty or null and the type
                                 could not be determined from the file name.
hbase-common/src/main/java/org/apache/hadoop/hbase/io/crypto/tls/KeyStoreFileType.java