From e4e263c292677b8749b2729a86bc00734dcaee2e Mon Sep 17 00:00:00 2001 From: Mark Payne Date: Mon, 31 Aug 2015 15:18:33 -0400 Subject: [PATCH] NIFI-914: If no krb5 file set in nifi properties, treat it the same as an empty string set --- .../src/main/java/org/apache/nifi/util/NiFiProperties.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nifi-commons/nifi-properties/src/main/java/org/apache/nifi/util/NiFiProperties.java b/nifi-commons/nifi-properties/src/main/java/org/apache/nifi/util/NiFiProperties.java index 5ee6c13dc4..a51d9bed99 100644 --- a/nifi-commons/nifi-properties/src/main/java/org/apache/nifi/util/NiFiProperties.java +++ b/nifi-commons/nifi-properties/src/main/java/org/apache/nifi/util/NiFiProperties.java @@ -803,8 +803,9 @@ public class NiFiProperties extends Properties { } public File getKerberosConfigurationFile() { - if (getProperty(KERBEROS_KRB5_FILE).trim().length() > 0) { - return new File(getProperty(KERBEROS_KRB5_FILE)); + final String krb5File = getProperty(KERBEROS_KRB5_FILE); + if (krb5File != null && krb5File.trim().length() > 0) { + return new File(krb5File.trim()); } else { return null; }