From a50a0c0873b3f0b9100aa7a1f4a343f05f6551cb Mon Sep 17 00:00:00 2001 From: dsyer Date: Mon, 18 Feb 2008 08:17:15 +0000 Subject: [PATCH] OPEN - issue BATCH-364: StepScope responsibilities can be assumed by Step (not ApplicationContext) http://jira.springframework.org/browse/BATCH-364 restart sample was failing because of wrong manipulation of version in step execution --- .../org/springframework/batch/core/domain/Entity.java | 11 ----------- .../batch/core/domain/StepExecution.java | 1 - 2 files changed, 12 deletions(-) diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/domain/Entity.java b/spring-batch-core/src/main/java/org/springframework/batch/core/domain/Entity.java index ed040fc26..db31f6707 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/domain/Entity.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/domain/Entity.java @@ -75,17 +75,6 @@ public class Entity implements Serializable { } } - /** - * - */ - protected void decrementVersion() { - if (version == null || version.intValue()==0) { - version = new Integer(0); - } else { - version = new Integer(version.intValue() - 1); - } - } - // @Override public String toString() { return ClassUtils.getShortName(getClass()) + ": id=" + getId(); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/domain/StepExecution.java b/spring-batch-core/src/main/java/org/springframework/batch/core/domain/StepExecution.java index 8ea3530e9..4f2032589 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/domain/StepExecution.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/domain/StepExecution.java @@ -357,7 +357,6 @@ public class StepExecution extends Entity { */ public synchronized void rollback() { rollbackCount++; - decrementVersion(); } /**