File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
main/java/opengrok/auth/plugin
test/java/opengrok/auth/plugin Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,10 @@ public class UserWhiteListPlugin implements IAuthorizationPlugin {
57
57
58
58
@ Override
59
59
public void load (Map <String , Object > parameters ) {
60
+ if (parameters == null ) {
61
+ throw new IllegalArgumentException ("Null parameter" );
62
+ }
63
+
60
64
String filePath ;
61
65
if ((filePath = (String ) parameters .get (FILE_PARAM )) == null ) {
62
66
throw new IllegalArgumentException ("Missing parameter [" + FILE_PARAM + "] in the configuration" );
Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ public void init(String param) {
117
117
@ MethodSource ("parameters" )
118
118
public void shouldThrowOnLoadIfNullArgument (String param ) {
119
119
init (param );
120
- assertThrows (NullPointerException .class , () -> {
120
+ assertThrows (IllegalArgumentException .class , () -> {
121
121
//noinspection ConstantConditions
122
122
plugin .load (null );
123
123
}, "plugin.load(null)" );
You can’t perform that action at this time.
0 commit comments