[java-mvn-enforcer] branch main updated: Prevent NPE on empty command line

Ian Young ian at iay.org.uk
Tue Aug 22 13:52:40 UTC 2023


This is an automated email from the git hooks/post-receive script.

iay pushed a commit to branch main
in repository java-mvn-enforcer.

View the commit online:
http://git.shibboleth.net/view/?p=java-mvn-enforcer.git;a=commit;h=f63554b795c890db6cf0a1331ed2d767542cb245

The following commit(s) were added to refs/heads/main by this push:
     new f63554b  Prevent NPE on empty command line
f63554b is described below

commit f63554b795c890db6cf0a1331ed2d767542cb245
Author: Ian Young <ian at iay.org.uk>
AuthorDate: Tue Aug 22 14:52:36 2023 +0100

    Prevent NPE on empty command line
---
 .../shibboleth/mvn/enforcer/cli/impl/ListKeysCommandLineArguments.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/test/java/net/shibboleth/mvn/enforcer/cli/impl/ListKeysCommandLineArguments.java b/src/test/java/net/shibboleth/mvn/enforcer/cli/impl/ListKeysCommandLineArguments.java
index d958249..35327ba 100644
--- a/src/test/java/net/shibboleth/mvn/enforcer/cli/impl/ListKeysCommandLineArguments.java
+++ b/src/test/java/net/shibboleth/mvn/enforcer/cli/impl/ListKeysCommandLineArguments.java
@@ -70,7 +70,7 @@ public class ListKeysCommandLineArguments extends AbstractCommandLineArguments {
     
     /** {@inheritDoc} */
     public void validate() throws IllegalArgumentException {
-        if (getKeyRings().isEmpty()) {
+        if (getKeyRings() == null || getKeyRings().isEmpty()) {
             throw new IllegalArgumentException("At least one keyring folder (-k) must be specified");
         }
     }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list