NIFI-914: If no krb5 file set in nifi properties, treat it the same as an empty string set

This commit is contained in:
Mark Payne 2015-08-31 15:18:33 -04:00
parent cd2e1424cb
commit e4e263c292
1 changed files with 3 additions and 2 deletions

View File

@ -803,8 +803,9 @@ public class NiFiProperties extends Properties {
} }
public File getKerberosConfigurationFile() { public File getKerberosConfigurationFile() {
if (getProperty(KERBEROS_KRB5_FILE).trim().length() > 0) { final String krb5File = getProperty(KERBEROS_KRB5_FILE);
return new File(getProperty(KERBEROS_KRB5_FILE)); if (krb5File != null && krb5File.trim().length() > 0) {
return new File(krb5File.trim());
} else { } else {
return null; return null;
} }