Add notNull assertion in JobParameter to ensure type is not null

Resolves #4263
This commit is contained in:
drow724
2022-12-25 23:57:43 +09:00
committed by Mahmoud Ben Hassine
parent 33c8760f49
commit 6bea505f15

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2022 the original author or authors.
* Copyright 2006-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -30,6 +30,7 @@ import org.springframework.util.Assert;
* @author Dave Syer
* @author Michael Minella
* @author Mahmoud Ben Hassine
* @author Song JaeGeun
* @since 2.0
*
*/
@@ -49,7 +50,7 @@ public class JobParameter<T> implements Serializable {
*/
public JobParameter(@NonNull T value, @NonNull Class<T> type, boolean identifying) {
Assert.notNull(value, "value must not be null");
Assert.notNull(value, "type must not be null");
Assert.notNull(type, "type must not be null");
this.value = value;
this.type = type;
this.identifying = identifying;