[spring-extensions] branch main updated: Null guard.
Scott Cantor
cantor.2 at osu.edu
Tue Sep 22 13:43:49 UTC 2020
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch main
in repository spring-extensions.
View the commit online:
http://git.shibboleth.net/view/?p=spring-extensions.git;a=commit;h=f721df7ea709e12f20a5db44a4c4c99796dec757
The following commit(s) were added to refs/heads/main by this push:
new f721df7 Null guard.
f721df7 is described below
commit f721df7ea709e12f20a5db44a4c4c99796dec757
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Sep 22 09:43:47 2020 -0400
Null guard.
---
.../net/shibboleth/ext/spring/cli/AbstractCommandLineArguments.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/main/java/net/shibboleth/ext/spring/cli/AbstractCommandLineArguments.java b/src/main/java/net/shibboleth/ext/spring/cli/AbstractCommandLineArguments.java
index 37e382b..545e1e7 100644
--- a/src/main/java/net/shibboleth/ext/spring/cli/AbstractCommandLineArguments.java
+++ b/src/main/java/net/shibboleth/ext/spring/cli/AbstractCommandLineArguments.java
@@ -19,6 +19,7 @@ package net.shibboleth.ext.spring.cli;
import java.io.PrintStream;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
import java.util.Locale.LanguageRange;
@@ -28,6 +29,7 @@ import javax.annotation.Nullable;
import org.slf4j.Logger;
import com.beust.jcommander.Parameter;
+import com.google.common.base.Strings;
import net.shibboleth.utilities.java.support.annotation.constraint.NonnullElements;
import net.shibboleth.utilities.java.support.annotation.constraint.NotLive;
@@ -124,6 +126,9 @@ public abstract class AbstractCommandLineArguments implements CommandLineArgumen
* @return language ranges
*/
@Nonnull @NonnullElements @Unmodifiable @NotLive public List<LanguageRange> getLanguageRanges() {
+ if (Strings.isNullOrEmpty(languageRanges)) {
+ return Collections.emptyList();
+ }
return List.copyOf(LanguageRange.parse(languageRanges));
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list