Skip to content

Commit 86d03d0

Browse files
committed
Implement equals/hashcode in BatchTestContextCustomizer
Resolves #3940
1 parent d6178d3 commit 86d03d0

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

+11-1
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)