diff --git a/spring-batch-core-tests/src/test/java/org/springframework/batch/core/test/step/StepExecutionSerializationUtilsTests.java b/spring-batch-core-tests/src/test/java/org/springframework/batch/core/test/step/StepExecutionSerializationUtilsTests.java index ebda63632..8fc1ad4cc 100644 --- a/spring-batch-core-tests/src/test/java/org/springframework/batch/core/test/step/StepExecutionSerializationUtilsTests.java +++ b/spring-batch-core-tests/src/test/java/org/springframework/batch/core/test/step/StepExecutionSerializationUtilsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2013 the original author or authors. + * Copyright 2006-2014 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. @@ -30,7 +30,7 @@ import org.springframework.batch.core.JobExecution; import org.springframework.batch.core.JobInstance; import org.springframework.batch.core.JobParameters; import org.springframework.batch.core.StepExecution; -import org.springframework.batch.support.SerializationUtils; +import org.springframework.util.SerializationUtils; /** * @author Dave Syer diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/MapExecutionContextDao.java b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/MapExecutionContextDao.java index 9a136a098..4668dcb6b 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/MapExecutionContextDao.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/MapExecutionContextDao.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2013 the original author or authors. + * Copyright 2006-2014 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. @@ -23,9 +23,9 @@ import java.util.concurrent.ConcurrentMap; import org.springframework.batch.core.JobExecution; import org.springframework.batch.core.StepExecution; import org.springframework.batch.item.ExecutionContext; -import org.springframework.batch.support.SerializationUtils; import org.springframework.batch.support.transaction.TransactionAwareProxyFactory; import org.springframework.util.Assert; +import org.springframework.util.SerializationUtils; /** * In-memory implementation of {@link ExecutionContextDao} backed by maps. diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/MapJobExecutionDao.java b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/MapJobExecutionDao.java index 7c30b8ac2..cef950b0e 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/MapJobExecutionDao.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/MapJobExecutionDao.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2013 the original author or authors. + * Copyright 2006-2014 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. @@ -28,9 +28,9 @@ import java.util.concurrent.atomic.AtomicLong; import org.springframework.batch.core.JobExecution; import org.springframework.batch.core.JobInstance; -import org.springframework.batch.support.SerializationUtils; import org.springframework.dao.OptimisticLockingFailureException; import org.springframework.util.Assert; +import org.springframework.util.SerializationUtils; /** * In-memory implementation of {@link JobExecutionDao}. diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/MapStepExecutionDao.java b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/MapStepExecutionDao.java index 69f69d592..87ad900c4 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/MapStepExecutionDao.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/MapStepExecutionDao.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2013 the original author or authors. + * Copyright 2006-2014 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. @@ -28,10 +28,10 @@ import java.util.concurrent.atomic.AtomicLong; import org.springframework.batch.core.Entity; import org.springframework.batch.core.JobExecution; import org.springframework.batch.core.StepExecution; -import org.springframework.batch.support.SerializationUtils; import org.springframework.dao.OptimisticLockingFailureException; import org.springframework.util.Assert; import org.springframework.util.ReflectionUtils; +import org.springframework.util.SerializationUtils; /** * In-memory implementation of {@link StepExecutionDao}. diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/ExitStatusTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/ExitStatusTests.java index 30e9ddc30..979329099 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/ExitStatusTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/ExitStatusTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007 the original author or authors. + * Copyright 2006-2014 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. @@ -20,11 +20,11 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import org.junit.Test; -import org.springframework.batch.support.SerializationUtils; +import org.springframework.util.SerializationUtils; /** * @author Dave Syer - * + * */ public class ExitStatusTests { @@ -54,7 +54,7 @@ public class ExitStatusTests { /** * Test equality of exit statuses. - * + * * @throws Exception */ @Test @@ -75,7 +75,7 @@ public class ExitStatusTests { /** * Test equality of exit statuses. - * + * * @throws Exception */ @Test @@ -85,7 +85,7 @@ public class ExitStatusTests { /** * Test equality of exit statuses. - * + * * @throws Exception */ @Test diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/JobExecutionTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/JobExecutionTests.java index 3609e8755..0805b8bb3 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/JobExecutionTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/JobExecutionTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007 the original author or authors. + * Copyright 2006-2014 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. @@ -26,7 +26,7 @@ import java.util.Date; import java.util.List; import org.junit.Test; -import org.springframework.batch.support.SerializationUtils; +import org.springframework.util.SerializationUtils; /** * @author Dave Syer diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/JobInstanceTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/JobInstanceTests.java index 4fbc78c02..631a9e4c7 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/JobInstanceTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/JobInstanceTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007 the original author or authors. + * Copyright 2006-2014 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. @@ -19,7 +19,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; import org.junit.Test; -import org.springframework.batch.support.SerializationUtils; +import org.springframework.util.SerializationUtils; /** * @author dsyer diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/JobParametersTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/JobParametersTests.java index e7a8c62d7..ba454ebfd 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/JobParametersTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/JobParametersTests.java @@ -13,7 +13,7 @@ import java.util.Map.Entry; import org.junit.Before; import org.junit.Test; -import org.springframework.batch.support.SerializationUtils; +import org.springframework.util.SerializationUtils; /** * @author Lucas Ward diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/StepExecutionTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/StepExecutionTests.java index f0aa2c80f..2e060c94a 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/StepExecutionTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/StepExecutionTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007 the original author or authors. + * Copyright 2006-2014 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. @@ -30,7 +30,7 @@ import org.junit.Before; import org.junit.Test; import org.springframework.batch.core.step.StepSupport; import org.springframework.batch.item.ExecutionContext; -import org.springframework.batch.support.SerializationUtils; +import org.springframework.util.SerializationUtils; /** * @author Dave Syer diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/support/SerializationUtils.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/support/SerializationUtils.java deleted file mode 100644 index ac4f5ac81..000000000 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/support/SerializationUtils.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright 2006-2010 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.springframework.batch.support; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.io.OptionalDataException; - - -/** - * Static utility to help with serialization. - * - * @author Dave Syer - * - */ -public class SerializationUtils { - - /** - * Serialize the object provided. - * - * @param object the object to serialize - * @return an array of bytes representing the object in a portable fashion - */ - public static byte[] serialize(Object object) { - - if (object==null) { - return null; - } - - ByteArrayOutputStream stream = new ByteArrayOutputStream(); - try { - new ObjectOutputStream(stream).writeObject(object); - } catch (IOException e) { - throw new IllegalArgumentException("Could not serialize object of type: "+object.getClass(), e); - } - - return stream.toByteArray(); - - } - - /** - * @param bytes a serialized object created - * @return the result of deserializing the bytes - */ - public static Object deserialize(byte[] bytes) { - - if (bytes==null) { - return null; - } - - try { - return new ObjectInputStream(new ByteArrayInputStream(bytes)).readObject(); - } - catch (OptionalDataException e) { - throw new IllegalArgumentException("Could not deserialize object: eof="+e.eof+ " at length="+e.length, e); - } - catch (IOException e) { - throw new IllegalArgumentException("Could not deserialize object", e); - } - catch (ClassNotFoundException e) { - throw new IllegalStateException("Could not deserialize object type", e); - } - - } - -} diff --git a/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/ExecutionContextTests.java b/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/ExecutionContextTests.java index fd7ef8f9e..f6a9f0a33 100644 --- a/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/ExecutionContextTests.java +++ b/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/ExecutionContextTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2008 the original author or authors. + * Copyright 2006-2014 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. @@ -25,11 +25,11 @@ import java.io.Serializable; import org.junit.Before; import org.junit.Test; -import org.springframework.batch.support.SerializationUtils; +import org.springframework.util.SerializationUtils; /** * @author Lucas Ward - * + * */ public class ExecutionContextTests { @@ -203,15 +203,19 @@ public class ExecutionContextTests { @Override public boolean equals(Object obj) { - if (this == obj) + if (this == obj) { return true; - if (obj == null) + } + if (obj == null) { return false; - if (getClass() != obj.getClass()) + } + if (getClass() != obj.getClass()) { return false; + } TestSerializable other = (TestSerializable) obj; - if (value != other.value) + if (value != other.value) { return false; + } return true; } diff --git a/spring-batch-infrastructure/src/test/java/org/springframework/batch/support/MapSerializationUtilsTests.java b/spring-batch-infrastructure/src/test/java/org/springframework/batch/support/MapSerializationUtilsTests.java deleted file mode 100644 index e9d6e161c..000000000 --- a/spring-batch-infrastructure/src/test/java/org/springframework/batch/support/MapSerializationUtilsTests.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2006-2010 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.springframework.batch.support; - -import static org.junit.Assert.assertEquals; - -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; - -import org.junit.Test; - -/** - * @author Dave Syer - * - */ -public class MapSerializationUtilsTests { - - private Map map = new ConcurrentHashMap(); - - @Test - public void testCycle() throws Exception { - map.put("foo.bar.spam", 123); - Map result = getCopy(map); - assertEquals(map, result); - } - - @Test - public void testMultipleCycles() throws Exception { - map.put("foo.bar.spam", 123); - for (int i = 0; i < 1000; i++) { - Map result = getCopy(map); - assertEquals(map, result); - } - } - - @SuppressWarnings("unchecked") - private Map getCopy(Map map) { - return (Map) SerializationUtils.deserialize(SerializationUtils.serialize(map)); - } - -} diff --git a/spring-batch-infrastructure/src/test/java/org/springframework/batch/support/SerializationUtilsTests.java b/spring-batch-infrastructure/src/test/java/org/springframework/batch/support/SerializationUtilsTests.java deleted file mode 100644 index 2fd8da735..000000000 --- a/spring-batch-infrastructure/src/test/java/org/springframework/batch/support/SerializationUtilsTests.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright 2006-2010 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.springframework.batch.support; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; - -import java.math.BigInteger; - -import org.junit.Test; - -/** - * Static utility to help with serialization. - * - * @author Dave Syer - * - */ -public class SerializationUtilsTests { - - private static BigInteger FOO = new BigInteger( - "-97029424235490125267223648383278313796609415534328015655051436753861088839708112925637575585166033560096810615697574744209306031461371833798723505120163874786203211176873686513374052845353833564048"); - - @Test - public void testSerializeCycleSunnyDay() throws Exception { - assertEquals("foo", SerializationUtils.deserialize(SerializationUtils.serialize("foo"))); - } - - @Test(expected = IllegalStateException.class) - public void testDeserializeUndefined() throws Exception { - byte[] bytes = FOO.toByteArray(); - Object foo = SerializationUtils.deserialize(bytes); - assertNotNull(foo); - } - - @Test(expected = IllegalArgumentException.class) - public void testSerializeNonSerializable() throws Exception { - SerializationUtils.serialize(new Object()); - } - - @Test(expected = IllegalArgumentException.class) - public void testDeserializeNonSerializable() throws Exception { - SerializationUtils.deserialize("foo".getBytes()); - } - - @Test - public void testSerializeNull() throws Exception { - assertNull(SerializationUtils.serialize(null)); - } - - @Test - public void testDeserializeNull() throws Exception { - assertNull(SerializationUtils.deserialize(null)); - } - -} diff --git a/spring-batch-samples/src/main/java/org/springframework/batch/sample/common/StagingItemReader.java b/spring-batch-samples/src/main/java/org/springframework/batch/sample/common/StagingItemReader.java index 757033fbc..99e05d148 100644 --- a/spring-batch-samples/src/main/java/org/springframework/batch/sample/common/StagingItemReader.java +++ b/spring-batch-samples/src/main/java/org/springframework/batch/sample/common/StagingItemReader.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2012 the original author or authors. + * Copyright 2006-2014 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. @@ -30,7 +30,6 @@ import org.springframework.batch.core.StepExecution; import org.springframework.batch.core.StepExecutionListener; import org.springframework.batch.item.ItemReader; import org.springframework.batch.item.ReaderNotOpenException; -import org.springframework.batch.support.SerializationUtils; import org.springframework.beans.factory.DisposableBean; import org.springframework.beans.factory.InitializingBean; import org.springframework.dao.DataAccessException; @@ -38,6 +37,7 @@ import org.springframework.jdbc.core.JdbcOperations; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.core.simple.ParameterizedRowMapper; import org.springframework.util.Assert; +import org.springframework.util.SerializationUtils; /** * Thread-safe database {@link ItemReader} implementing the process indicator @@ -46,7 +46,7 @@ import org.springframework.util.Assert; * To achieve restartability use together with {@link StagingItemProcessor}. */ public class StagingItemReader implements ItemReader>, StepExecutionListener, - InitializingBean, DisposableBean { +InitializingBean, DisposableBean { private static Log logger = LogFactory.getLog(StagingItemReader.class); @@ -64,11 +64,13 @@ public class StagingItemReader implements ItemReader implements ItemReader() { - public Long mapRow(ResultSet rs, int rowNum) throws SQLException { - return rs.getLong(1); - } - }, + new ParameterizedRowMapper() { + @Override + public Long mapRow(ResultSet rs, int rowNum) throws SQLException { + return rs.getLong(1); + } + }, - stepExecution.getJobExecution().getJobId(), StagingItemWriter.NEW); + stepExecution.getJobExecution().getJobId(), StagingItemWriter.NEW); } } + @Override public ProcessIndicatorItemWrapper read() throws DataAccessException { if (!initialized) { @@ -113,20 +117,23 @@ public class StagingItemReader implements ItemReader() { - public Object mapRow(ResultSet rs, int rowNum) throws SQLException { - byte[] blob = rs.getBytes(1); - return SerializationUtils.deserialize(blob); - } - }, id); + @Override + public Object mapRow(ResultSet rs, int rowNum) throws SQLException { + byte[] blob = rs.getBytes(1); + return SerializationUtils.deserialize(blob); + } + }, id); return new ProcessIndicatorItemWrapper(id, result); } + @Override public ExitStatus afterStep(StepExecution stepExecution) { return null; } + @Override public void beforeStep(StepExecution stepExecution) { this.stepExecution = stepExecution; synchronized (lock) { diff --git a/spring-batch-samples/src/main/java/org/springframework/batch/sample/common/StagingItemWriter.java b/spring-batch-samples/src/main/java/org/springframework/batch/sample/common/StagingItemWriter.java index a9444f610..865b8f3bb 100644 --- a/spring-batch-samples/src/main/java/org/springframework/batch/sample/common/StagingItemWriter.java +++ b/spring-batch-samples/src/main/java/org/springframework/batch/sample/common/StagingItemWriter.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007 the original author or authors. + * Copyright 2006-2014 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. @@ -16,7 +16,6 @@ package org.springframework.batch.sample.common; -import java.io.Serializable; import java.sql.PreparedStatement; import java.sql.SQLException; import java.util.List; @@ -26,12 +25,12 @@ import org.springframework.batch.core.ExitStatus; import org.springframework.batch.core.StepExecution; import org.springframework.batch.core.StepExecutionListener; import org.springframework.batch.item.ItemWriter; -import org.springframework.batch.support.SerializationUtils; import org.springframework.jdbc.core.BatchPreparedStatementSetter; import org.springframework.jdbc.core.support.JdbcDaoSupport; import org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer; import org.springframework.util.Assert; import org.springframework.util.ClassUtils; +import org.springframework.util.SerializationUtils; /** * Database {@link ItemWriter} implementing the process indicator pattern. @@ -50,9 +49,10 @@ public class StagingItemWriter extends JdbcDaoSupport implements StepExecutio /** * Check mandatory properties. - * + * * @see org.springframework.dao.support.DaoSupport#initDao() */ + @Override protected void initDao() throws Exception { super.initDao(); Assert.notNull(incrementer, "DataFieldMaxValueIncrementer is required - set the incrementer property in the " @@ -61,7 +61,7 @@ public class StagingItemWriter extends JdbcDaoSupport implements StepExecutio /** * Setter for the key generator for the staging table. - * + * * @param incrementer the {@link DataFieldMaxValueIncrementer} to set */ public void setIncrementer(DataFieldMaxValueIncrementer incrementer) { @@ -70,55 +70,60 @@ public class StagingItemWriter extends JdbcDaoSupport implements StepExecutio /** * Serialize the item to the staging table, and add a NEW processed flag. - * + * * @see ItemWriter#write(java.util.List) */ + @Override public void write(final List items) { final ListIterator itemIterator = items.listIterator(); getJdbcTemplate().batchUpdate("INSERT into BATCH_STAGING (ID, JOB_ID, VALUE, PROCESSED) values (?,?,?,?)", new BatchPreparedStatementSetter() { - public int getBatchSize() { - return items.size(); - } + @Override + public int getBatchSize() { + return items.size(); + } - public void setValues(PreparedStatement ps, int i) throws SQLException { + @Override + public void setValues(PreparedStatement ps, int i) throws SQLException { - long id = incrementer.nextLongValue(); - long jobId = stepExecution.getJobExecution().getJobId(); + long id = incrementer.nextLongValue(); + long jobId = stepExecution.getJobExecution().getJobId(); - Assert.state(itemIterator.nextIndex() == i, - "Item ordering must be preserved in batch sql update"); + Assert.state(itemIterator.nextIndex() == i, + "Item ordering must be preserved in batch sql update"); - byte[] blob = SerializationUtils.serialize((Serializable) itemIterator.next()); + byte[] blob = SerializationUtils.serialize(itemIterator.next()); - ps.setLong(1, id); - ps.setLong(2, jobId); - ps.setBytes(3, blob); - ps.setString(4, NEW); - } - }); + ps.setLong(1, id); + ps.setLong(2, jobId); + ps.setBytes(3, blob); + ps.setString(4, NEW); + } + }); } /* * (non-Javadoc) - * + * * @see * org.springframework.batch.core.domain.StepListener#afterStep(StepExecution * ) */ + @Override public ExitStatus afterStep(StepExecution stepExecution) { return null; } /* * (non-Javadoc) - * + * * @seeorg.springframework.batch.core.domain.StepListener#beforeStep(org. * springframework.batch.core.domain.StepExecution) */ + @Override public void beforeStep(StepExecution stepExecution) { this.stepExecution = stepExecution; }