Skip to content

Commit 6bea505

Browse files
drow724fmbenhassine
authored andcommitted
Add notNull assertion in JobParameter to ensure type is not null
Resolves #4263
1 parent 33c8760 commit 6bea505

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

spring-batch-core/src/main/java/org/springframework/batch/core/JobParameter.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2006-2022 the original author or authors.
2+
* Copyright 2006-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -30,6 +30,7 @@
3030
* @author Dave Syer
3131
* @author Michael Minella
3232
* @author Mahmoud Ben Hassine
33+
* @author Song JaeGeun
3334
* @since 2.0
3435
*
3536
*/
@@ -49,7 +50,7 @@ public class JobParameter<T> implements Serializable {
4950
*/
5051
public JobParameter(@NonNull T value, @NonNull Class<T> type, boolean identifying) {
5152
Assert.notNull(value, "value must not be null");
52-
Assert.notNull(value, "type must not be null");
53+
Assert.notNull(type, "type must not be null");
5354
this.value = value;
5455
this.type = type;
5556
this.identifying = identifying;

0 commit comments

Comments
 (0)