Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate parameter passed to ConfiguratorBase.param() #27694

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import org.jboss.jandex.AnnotationInstance;
import org.jboss.jandex.ClassInfo;

Expand Down Expand Up @@ -31,6 +32,7 @@ public THIS param(String name, boolean value) {
}

public THIS param(String name, boolean[] value) {
Objects.requireNonNull(value, "Parameter value can't be null");
mkouba marked this conversation as resolved.
Show resolved Hide resolved
params.put(name, value);
return self();
}
Expand All @@ -41,6 +43,7 @@ public THIS param(String name, byte value) {
}

public THIS param(String name, byte[] value) {
Objects.requireNonNull(value, "Parameter value can't be null");
params.put(name, value);
return self();
}
Expand All @@ -51,6 +54,7 @@ public THIS param(String name, short value) {
}

public THIS param(String name, short[] value) {
Objects.requireNonNull(value, "Parameter value can't be null");
params.put(name, value);
return self();
}
Expand All @@ -61,6 +65,7 @@ public THIS param(String name, int value) {
}

public THIS param(String name, int[] value) {
Objects.requireNonNull(value, "Parameter value can't be null");
params.put(name, value);
return self();
}
Expand All @@ -71,6 +76,7 @@ public THIS param(String name, long value) {
}

public THIS param(String name, long[] value) {
Objects.requireNonNull(value, "Parameter value can't be null");
params.put(name, value);
return self();
}
Expand All @@ -81,6 +87,7 @@ public THIS param(String name, float value) {
}

public THIS param(String name, float[] value) {
Objects.requireNonNull(value, "Parameter value can't be null");
params.put(name, value);
return self();
}
Expand All @@ -91,6 +98,7 @@ public THIS param(String name, double value) {
}

public THIS param(String name, double[] value) {
Objects.requireNonNull(value, "Parameter value can't be null");
params.put(name, value);
return self();
}
Expand All @@ -101,56 +109,67 @@ public THIS param(String name, char value) {
}

public THIS param(String name, char[] value) {
Objects.requireNonNull(value, "Parameter value can't be null");
params.put(name, value);
return self();
}

public THIS param(String name, String value) {
Objects.requireNonNull(value, "Parameter value can't be null");
params.put(name, value);
return self();
}

public THIS param(String name, String[] value) {
Objects.requireNonNull(value, "Parameter value can't be null");
params.put(name, value);
return self();
}

public THIS param(String name, Enum<?> value) {
Objects.requireNonNull(value, "Parameter value can't be null");
params.put(name, value);
return self();
}

public THIS param(String name, Enum<?>[] value) {
Objects.requireNonNull(value, "Parameter value can't be null");
params.put(name, value);
return self();
}

public THIS param(String name, Class<?> value) {
Objects.requireNonNull(value, "Parameter value can't be null");
params.put(name, value);
return self();
}

public THIS param(String name, Class<?>[] value) {
Objects.requireNonNull(value, "Parameter value can't be null");
params.put(name, value);
return self();
}

public THIS param(String name, ClassInfo value) {
Objects.requireNonNull(value, "Parameter value can't be null");
params.put(name, value);
return self();
}

public THIS param(String name, ClassInfo[] value) {
Objects.requireNonNull(value, "Parameter value can't be null");
params.put(name, value);
return self();
}

public THIS param(String name, AnnotationInstance value) {
Objects.requireNonNull(value, "Parameter value can't be null");
params.put(name, value);
return self();
}

public THIS param(String name, AnnotationInstance[] value) {
Objects.requireNonNull(value, "Parameter value can't be null");
params.put(name, value);
return self();
}
Expand Down