Change metrics type from int to long in StepExecution

This change prevents integer overflows in
steps operating on a large number of items.

Resolves #3650
This commit is contained in:
Mahmoud Ben Hassine
2021-01-29 14:35:47 +01:00
parent 78ddf44730
commit 327160a3ab
17 changed files with 96 additions and 87 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2008-2019 the original author or authors.
* Copyright 2008-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -31,6 +31,7 @@ import org.springframework.util.Assert;
/**
* @author Dan Garrette
* @author Mahmoud Ben Hassine
* @since 2.0
*/
public class ErrorLogTasklet implements Tasklet, StepExecutionListener {
@@ -52,7 +53,7 @@ public class ErrorLogTasklet implements Tasklet, StepExecutionListener {
/**
* @return
*/
private int getSkipCount() {
private long getSkipCount() {
if (stepExecution == null || stepName == null) {
return 0;
}