Skip to content

Commit 3e9f48d

Browse files
committed
Fix adding an incorrectly added function
1 parent dee6862 commit 3e9f48d

File tree

1 file changed

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

1 file changed

+24
-19
lines changed

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

+24-19
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,30 @@ 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+
218+
if (!(o instanceof Chunk)) {
219+
return false;
220+
}
221+
222+
Chunk<?> chunk = (Chunk<?>) o;
223+
return end == chunk.end &&
224+
busy == chunk.busy &&
225+
Objects.equals(items, chunk.items) &&
226+
Objects.equals(skips, chunk.skips) &&
227+
Objects.equals(errors, chunk.errors) &&
228+
Objects.equals(userData, chunk.userData);
229+
}
230+
231+
@Override
232+
public int hashCode() {
233+
return Objects.hash(items, skips, errors, userData, end, busy);
234+
}
235+
212236
/**
213237
* Special iterator for a chunk providing the {@link #remove(Throwable)} method for
214238
* dynamically removing an item and adding it to the skips.
@@ -260,25 +284,6 @@ public String toString() {
260284
return String.format("[items=%s, skips=%s]", items, skips);
261285
}
262286

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-
282287
}
283288

284289
}

0 commit comments

Comments
 (0)