Skip to content

Commit a80f0a7

Browse files
committed
Fix adding an incorrectly added function
1 parent f06772d commit a80f0a7

File tree

1 file changed

+20
-19
lines changed
  • spring-batch-infrastructure/src/main/java/org/springframework/batch/item

1 file changed

+20
-19
lines changed

Diff for: spring-batch-infrastructure/src/main/java/org/springframework/batch/item/Chunk.java

+20-19
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,26 @@ public String toString() {
209209
return String.format("[items=%s, skips=%s]", items, skips);
210210
}
211211

212+
@Override
213+
public boolean equals(Object o) {
214+
if (this == o) {
215+
return true;
216+
}
217+
if (!(o instanceof Chunk)) {
218+
return false;
219+
}
220+
221+
Chunk<?> chunk = (Chunk<?>) o;
222+
return end == chunk.end && busy == chunk.busy && Objects.equals(items, chunk.items)
223+
&& Objects.equals(skips, chunk.skips) && Objects.equals(errors, chunk.errors)
224+
&& Objects.equals(userData, chunk.userData);
225+
}
226+
227+
@Override
228+
public int hashCode() {
229+
return Objects.hash(items, skips, errors, userData, end, busy);
230+
}
231+
212232
/**
213233
* Special iterator for a chunk providing the {@link #remove(Throwable)} method for
214234
* dynamically removing an item and adding it to the skips.
@@ -260,25 +280,6 @@ public String toString() {
260280
return String.format("[items=%s, skips=%s]", items, skips);
261281
}
262282

263-
@Override
264-
public int hashCode() {
265-
return Objects.hash(items, skips, errors, userData, end, busy);
266-
}
267-
268-
@Override
269-
public boolean equals(Object obj) {
270-
if (this == obj) {
271-
return true;
272-
}
273-
if (!(obj instanceof Chunk)) {
274-
return false;
275-
}
276-
Chunk<?> other = (Chunk<?>) obj;
277-
return Objects.equals(items, other.items) && Objects.equals(skips, other.skips)
278-
&& Objects.equals(errors, other.errors) && Objects.equals(userData, other.userData)
279-
&& end == other.end && busy == other.busy;
280-
}
281-
282283
}
283284

284285
}

0 commit comments

Comments
 (0)