Repository: nifi Updated Branches: refs/heads/master cd2e1424c -> e4e263c29
NIFI-914: If no krb5 file set in nifi properties, treat it the same as an empty string set Project: http://git-wip-us.apache.org/repos/asf/nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/e4e263c2 Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/e4e263c2 Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/e4e263c2 Branch: refs/heads/master Commit: e4e263c292677b8749b2729a86bc00734dcaee2e Parents: cd2e142 Author: Mark Payne <[email protected]> Authored: Mon Aug 31 15:18:33 2015 -0400 Committer: Mark Payne <[email protected]> Committed: Mon Aug 31 15:18:33 2015 -0400 ---------------------------------------------------------------------- .../src/main/java/org/apache/nifi/util/NiFiProperties.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/nifi/blob/e4e263c2/nifi-commons/nifi-properties/src/main/java/org/apache/nifi/util/NiFiProperties.java ---------------------------------------------------------------------- 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 5ee6c13..a51d9be 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; }
