BATCH-2050: AbstractItemCountingItemStreamItemReader.read() shouldn't
be final
This commit is contained in:
@@ -394,7 +394,7 @@ implements InitializingBean {
|
||||
* Execute the statement to open the cursor.
|
||||
*/
|
||||
@Override
|
||||
protected final void doOpen() throws Exception {
|
||||
protected void doOpen() throws Exception {
|
||||
|
||||
Assert.state(!initialized, "Stream is already initialized. Close before re-opening.");
|
||||
Assert.isNull(rs, "ResultSet still open! Close before re-opening.");
|
||||
|
||||
@@ -81,7 +81,7 @@ public class HibernateItemWriter<T> implements ItemWriter<T>, InitializingBean {
|
||||
*
|
||||
* @param sessionFactory session factory to be used by the writer
|
||||
*/
|
||||
public final void setSessionFactory(SessionFactory sessionFactory) {
|
||||
public void setSessionFactory(SessionFactory sessionFactory) {
|
||||
this.sessionFactory = sessionFactory;
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ public class HibernateItemWriter<T> implements ItemWriter<T>, InitializingBean {
|
||||
* @see org.springframework.batch.item.ItemWriter#write(java.util.List)
|
||||
*/
|
||||
@Override
|
||||
public final void write(List<? extends T> items) {
|
||||
public void write(List<? extends T> items) {
|
||||
if(sessionFactory == null) {
|
||||
doWrite(hibernateTemplate, items);
|
||||
hibernateTemplate.flush();
|
||||
|
||||
@@ -76,7 +76,7 @@ public class JpaItemWriter<T> implements ItemWriter<T>, InitializingBean {
|
||||
* @see org.springframework.batch.item.ItemWriter#write(java.util.List)
|
||||
*/
|
||||
@Override
|
||||
public final void write(List<? extends T> items) {
|
||||
public void write(List<? extends T> items) {
|
||||
EntityManager entityManager = EntityManagerFactoryUtils.getTransactionalEntityManager(entityManagerFactory);
|
||||
if (entityManager == null) {
|
||||
throw new DataAccessResourceFailureException("Unable to obtain a transactional EntityManager");
|
||||
|
||||
@@ -117,7 +117,7 @@ public class DelimitedLineTokenizer extends AbstractLineTokenizer {
|
||||
*
|
||||
* @see #DEFAULT_QUOTE_CHARACTER
|
||||
*/
|
||||
public final void setQuoteCharacter(char quoteCharacter) {
|
||||
public void setQuoteCharacter(char quoteCharacter) {
|
||||
this.quoteCharacter = quoteCharacter;
|
||||
this.quoteString = "" + quoteCharacter;
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ public abstract class AbstractItemCountingItemStreamItemReader<T> extends Abstra
|
||||
}
|
||||
|
||||
@Override
|
||||
public final T read() throws Exception, UnexpectedInputException, ParseException {
|
||||
public T read() throws Exception, UnexpectedInputException, ParseException {
|
||||
if (currentItemCount >= maxItemCount) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user