diff --git a/core/src/main/java/org/springframework/batch/core/domain/JobExecution.java b/core/src/main/java/org/springframework/batch/core/domain/JobExecution.java index c70869388..100ae10be 100644 --- a/core/src/main/java/org/springframework/batch/core/domain/JobExecution.java +++ b/core/src/main/java/org/springframework/batch/core/domain/JobExecution.java @@ -78,10 +78,6 @@ public class JobExecution extends Entity { return jobId; } - public void setJobId(Long jobId) { - this.jobId = jobId; - } - /** * @param exitCode */ diff --git a/core/src/test/java/org/springframework/batch/core/domain/JobExecutionTests.java b/core/src/test/java/org/springframework/batch/core/domain/JobExecutionTests.java index 0d8ce603a..8ff233f1c 100644 --- a/core/src/test/java/org/springframework/batch/core/domain/JobExecutionTests.java +++ b/core/src/test/java/org/springframework/batch/core/domain/JobExecutionTests.java @@ -66,7 +66,7 @@ public class JobExecutionTests extends TestCase { */ public void testGetJobId() { assertEquals(11, execution.getJobId().longValue()); - execution.setJobId(new Long(23)); + execution = new JobExecution(new Long(23)); assertEquals(23, execution.getJobId().longValue()); }