Skip to content

Commit 1cbbf8a

Browse files
committed
Implement equals/hashcode in BatchTestContextCustomizer
Resolves #3940
1 parent a644ae3 commit 1cbbf8a

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

spring-batch-test/src/main/java/org/springframework/batch/test/context/BatchTestContextCustomizer.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018 the original author or authors.
2+
* Copyright 2018-2021 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.
@@ -51,4 +51,14 @@ public void customizeContext(ConfigurableApplicationContext context, MergedConte
5151
new RootBeanDefinition(JobRepositoryTestUtils.class));
5252
}
5353

54+
@Override
55+
public boolean equals(Object obj) {
56+
return obj != null && getClass() == obj.getClass();
57+
}
58+
59+
@Override
60+
public int hashCode() {
61+
return getClass().hashCode();
62+
}
63+
5464
}

0 commit comments

Comments
 (0)