Use annotation @Override consistently
This commit is contained in:
committed by
Mahmoud Ben Hassine
parent
52beef2dac
commit
0d1d89c82f
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2013 the original author or authors.
|
||||
* Copyright 2006-2023 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.
|
||||
@@ -21,25 +21,11 @@ package org.springframework.batch.core;
|
||||
*/
|
||||
public class JobExecutionExceptionTests extends AbstractExceptionTests {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.springframework.batch.io.exception.AbstractExceptionTests#getException(java.
|
||||
* lang.String)
|
||||
*/
|
||||
@Override
|
||||
public Exception getException(String msg) throws Exception {
|
||||
return new JobExecutionException(msg);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.springframework.batch.io.exception.AbstractExceptionTests#getException(java.
|
||||
* lang.String, java.lang.Throwable)
|
||||
*/
|
||||
@Override
|
||||
public Exception getException(String msg, Throwable t) throws Exception {
|
||||
return new JobExecutionException(msg, t);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2013 the original author or authors.
|
||||
* Copyright 2006-2023 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.
|
||||
@@ -21,25 +21,11 @@ package org.springframework.batch.core;
|
||||
*/
|
||||
public class JobInterruptedExceptionTests extends AbstractExceptionTests {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.springframework.batch.io.exception.AbstractExceptionTests#getException(java.
|
||||
* lang.String)
|
||||
*/
|
||||
@Override
|
||||
public Exception getException(String msg) throws Exception {
|
||||
return new JobInterruptedException(msg);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.springframework.batch.io.exception.AbstractExceptionTests#getException(java.
|
||||
* lang.String, java.lang.Throwable)
|
||||
*/
|
||||
@Override
|
||||
public Exception getException(String msg, Throwable t) throws Exception {
|
||||
return new RuntimeException(msg, t);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014 the original author or authors.
|
||||
* Copyright 2014-2023 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.
|
||||
@@ -42,95 +42,51 @@ public class PooledEmbeddedDataSource implements EmbeddedDatabase {
|
||||
this.dataSource = dataSource;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.sql.DataSource#getConnection()
|
||||
*/
|
||||
@Override
|
||||
public Connection getConnection() throws SQLException {
|
||||
return this.dataSource.getConnection();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.sql.DataSource#getConnection(java.lang.String, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public Connection getConnection(String username, String password) throws SQLException {
|
||||
return this.dataSource.getConnection(username, password);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.sql.CommonDataSource#getLogWriter()
|
||||
*/
|
||||
@Override
|
||||
public PrintWriter getLogWriter() throws SQLException {
|
||||
return this.dataSource.getLogWriter();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.sql.CommonDataSource#setLogWriter(java.io.PrintWriter)
|
||||
*/
|
||||
@Override
|
||||
public void setLogWriter(PrintWriter out) throws SQLException {
|
||||
this.dataSource.setLogWriter(out);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.sql.CommonDataSource#getLoginTimeout()
|
||||
*/
|
||||
@Override
|
||||
public int getLoginTimeout() throws SQLException {
|
||||
return this.dataSource.getLoginTimeout();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.sql.CommonDataSource#setLoginTimeout(int)
|
||||
*/
|
||||
@Override
|
||||
public void setLoginTimeout(int seconds) throws SQLException {
|
||||
this.dataSource.setLoginTimeout(seconds);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see java.sql.Wrapper#unwrap(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> T unwrap(Class<T> iface) throws SQLException {
|
||||
return this.dataSource.unwrap(iface);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see java.sql.Wrapper#isWrapperFor(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public boolean isWrapperFor(Class<?> iface) throws SQLException {
|
||||
return this.dataSource.isWrapperFor(iface);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Logger getParentLogger() {
|
||||
return Logger.getLogger(Logger.GLOBAL_LOGGER_NAME);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.springframework.jdbc.datasource.embedded.EmbeddedDatabase#shutdown()
|
||||
*/
|
||||
@Override
|
||||
public void shutdown() {
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2013 the original author or authors.
|
||||
* Copyright 2006-2023 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,25 +23,11 @@ import org.springframework.batch.core.AbstractExceptionTests;
|
||||
*/
|
||||
public class DuplicateJobExceptionTests extends AbstractExceptionTests {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.springframework.batch.io.exception.AbstractExceptionTests#getException(java.
|
||||
* lang.String)
|
||||
*/
|
||||
@Override
|
||||
public Exception getException(String msg) throws Exception {
|
||||
return new DuplicateJobException(msg);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.springframework.batch.io.exception.AbstractExceptionTests#getException(java.
|
||||
* lang.String, java.lang.Throwable)
|
||||
*/
|
||||
@Override
|
||||
public Exception getException(String msg, Throwable t) throws Exception {
|
||||
return new DuplicateJobException(msg, t);
|
||||
|
||||
@@ -230,6 +230,7 @@ public class StepScopeConfigurationTests {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String call() throws Exception {
|
||||
return value;
|
||||
}
|
||||
|
||||
@@ -155,6 +155,7 @@ class DefaultBatchConfigurationTests {
|
||||
static class MyJobConfigurationWithCustomInfrastructureBean extends MyJobConfiguration {
|
||||
|
||||
@Bean
|
||||
@Override
|
||||
public JobRepository jobRepository() {
|
||||
return new DummyJobRepository();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2013-2022 the original author or authors.
|
||||
* Copyright 2013-2023 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.
|
||||
@@ -40,13 +40,6 @@ public class JobParametersConverterSupport implements JobParametersConverter {
|
||||
return builder.toJobParameters();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.springframework.batch.core.converter.JobParametersConverter#getProperties(org.
|
||||
* springframework.batch.core.JobParameters)
|
||||
*/
|
||||
@Override
|
||||
public Properties getProperties(@Nullable JobParameters params) {
|
||||
Properties properties = new Properties();
|
||||
|
||||
@@ -23,14 +23,12 @@ import java.util.Map;
|
||||
|
||||
import org.springframework.batch.core.Job;
|
||||
import org.springframework.batch.core.JobExecution;
|
||||
import org.springframework.batch.core.JobParametersIncrementer;
|
||||
import org.springframework.batch.core.JobParametersValidator;
|
||||
import org.springframework.batch.core.Step;
|
||||
import org.springframework.batch.core.UnexpectedJobExecutionException;
|
||||
import org.springframework.batch.core.step.NoSuchStepException;
|
||||
import org.springframework.batch.core.step.StepLocator;
|
||||
import org.springframework.beans.factory.BeanNameAware;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.ClassUtils;
|
||||
|
||||
/**
|
||||
@@ -50,8 +48,6 @@ public class JobSupport implements BeanNameAware, Job, StepLocator {
|
||||
|
||||
private boolean restartable = false;
|
||||
|
||||
private int startLimit = Integer.MAX_VALUE;
|
||||
|
||||
private DefaultJobParametersValidator jobParametersValidator = new DefaultJobParametersValidator();
|
||||
|
||||
/**
|
||||
@@ -96,11 +92,6 @@ public class JobSupport implements BeanNameAware, Job, StepLocator {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.springframework.batch.core.domain.IJob#getName()
|
||||
*/
|
||||
@Override
|
||||
public String getName() {
|
||||
return name;
|
||||
@@ -124,39 +115,15 @@ public class JobSupport implements BeanNameAware, Job, StepLocator {
|
||||
this.steps.put(step.getName(), step);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.springframework.batch.core.domain.IJob#getStartLimit()
|
||||
*/
|
||||
public int getStartLimit() {
|
||||
return startLimit;
|
||||
}
|
||||
|
||||
public void setStartLimit(int startLimit) {
|
||||
this.startLimit = startLimit;
|
||||
}
|
||||
|
||||
public void setRestartable(boolean restartable) {
|
||||
this.restartable = restartable;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.springframework.batch.core.domain.IJob#isRestartable()
|
||||
*/
|
||||
@Override
|
||||
public boolean isRestartable() {
|
||||
return restartable;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.springframework.batch.core.domain.Job#run(org.springframework.batch
|
||||
* .core.domain.JobExecution)
|
||||
*/
|
||||
@Override
|
||||
public void execute(JobExecution execution) throws UnexpectedJobExecutionException {
|
||||
throw new UnsupportedOperationException(
|
||||
@@ -168,17 +135,6 @@ public class JobSupport implements BeanNameAware, Job, StepLocator {
|
||||
return ClassUtils.getShortName(getClass()) + ": [name=" + name + "]";
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.springframework.batch.core.Job#getJobParametersIncrementer()
|
||||
*/
|
||||
@Nullable
|
||||
@Override
|
||||
public JobParametersIncrementer getJobParametersIncrementer() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JobParametersValidator getJobParametersValidator() {
|
||||
return jobParametersValidator;
|
||||
|
||||
@@ -559,12 +559,6 @@ class SimpleJobTests {
|
||||
this.runnable = runnable;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.springframework.batch.core.step.StepSupport#execute(org.
|
||||
* springframework.batch.core.StepExecution)
|
||||
*/
|
||||
@Override
|
||||
public void execute(StepExecution stepExecution)
|
||||
throws JobInterruptedException, UnexpectedJobExecutionException {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2013 the original author or authors.
|
||||
* Copyright 2006-2023 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,25 +23,11 @@ import org.springframework.batch.core.AbstractExceptionTests;
|
||||
*/
|
||||
public class JobExecutionNotFailedExceptionTests extends AbstractExceptionTests {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.springframework.batch.io.exception.AbstractExceptionTests#getException(java.
|
||||
* lang.String)
|
||||
*/
|
||||
@Override
|
||||
public Exception getException(String msg) throws Exception {
|
||||
return new JobExecutionNotFailedException(msg);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.springframework.batch.io.exception.AbstractExceptionTests#getException(java.
|
||||
* lang.String, java.lang.Throwable)
|
||||
*/
|
||||
@Override
|
||||
public Exception getException(String msg, Throwable t) throws Exception {
|
||||
return new JobExecutionNotFailedException(msg, t);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2013 the original author or authors.
|
||||
* Copyright 2006-2023 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,25 +23,11 @@ import org.springframework.batch.core.AbstractExceptionTests;
|
||||
*/
|
||||
public class JobInstanceAlreadyExistsExceptionTests extends AbstractExceptionTests {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.springframework.batch.io.exception.AbstractExceptionTests#getException(java.
|
||||
* lang.String)
|
||||
*/
|
||||
@Override
|
||||
public Exception getException(String msg) throws Exception {
|
||||
return new JobInstanceAlreadyExistsException(msg);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.springframework.batch.io.exception.AbstractExceptionTests#getException(java.
|
||||
* lang.String, java.lang.Throwable)
|
||||
*/
|
||||
@Override
|
||||
public Exception getException(String msg, Throwable t) throws Exception {
|
||||
return new JobInstanceAlreadyExistsException(msg, t);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2013 the original author or authors.
|
||||
* Copyright 2006-2023 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,25 +23,11 @@ import org.springframework.batch.core.AbstractExceptionTests;
|
||||
*/
|
||||
public class JobParametersNotFoundExceptionTests extends AbstractExceptionTests {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.springframework.batch.io.exception.AbstractExceptionTests#getException(java.
|
||||
* lang.String)
|
||||
*/
|
||||
@Override
|
||||
public Exception getException(String msg) throws Exception {
|
||||
return new JobParametersNotFoundException(msg);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.springframework.batch.io.exception.AbstractExceptionTests#getException(java.
|
||||
* lang.String, java.lang.Throwable)
|
||||
*/
|
||||
@Override
|
||||
public Exception getException(String msg, Throwable t) throws Exception {
|
||||
return new JobParametersNotFoundException(msg, t);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2007 the original author or authors.
|
||||
* Copyright 2006-2023 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.core.launch;
|
||||
|
||||
import org.springframework.batch.core.AbstractExceptionTests;
|
||||
import org.springframework.batch.core.launch.NoSuchJobException;
|
||||
|
||||
/**
|
||||
* @author Dave Syer
|
||||
@@ -24,25 +23,11 @@ import org.springframework.batch.core.launch.NoSuchJobException;
|
||||
*/
|
||||
public class NoSuchJobExceptionTests extends AbstractExceptionTests {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.springframework.batch.io.exception.AbstractExceptionTests#getException(java.
|
||||
* lang.String)
|
||||
*/
|
||||
@Override
|
||||
public Exception getException(String msg) throws Exception {
|
||||
return new NoSuchJobException(msg);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.springframework.batch.io.exception.AbstractExceptionTests#getException(java.
|
||||
* lang.String, java.lang.Throwable)
|
||||
*/
|
||||
@Override
|
||||
public Exception getException(String msg, Throwable t) throws Exception {
|
||||
return new NoSuchJobException(msg, t);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2013 the original author or authors.
|
||||
* Copyright 2006-2023 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,25 +23,11 @@ import org.springframework.batch.core.AbstractExceptionTests;
|
||||
*/
|
||||
public class NoSuchJobExecutionExceptionTests extends AbstractExceptionTests {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.springframework.batch.io.exception.AbstractExceptionTests#getException(java.
|
||||
* lang.String)
|
||||
*/
|
||||
@Override
|
||||
public Exception getException(String msg) throws Exception {
|
||||
return new NoSuchJobExecutionException(msg);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.springframework.batch.io.exception.AbstractExceptionTests#getException(java.
|
||||
* lang.String, java.lang.Throwable)
|
||||
*/
|
||||
@Override
|
||||
public Exception getException(String msg, Throwable t) throws Exception {
|
||||
return new NoSuchJobExecutionException(msg, t);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2013 the original author or authors.
|
||||
* Copyright 2006-2023 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,25 +23,11 @@ import org.springframework.batch.core.AbstractExceptionTests;
|
||||
*/
|
||||
public class NoSuchJobInstanceExceptionTests extends AbstractExceptionTests {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.springframework.batch.io.exception.AbstractExceptionTests#getException(java.
|
||||
* lang.String)
|
||||
*/
|
||||
@Override
|
||||
public Exception getException(String msg) throws Exception {
|
||||
return new NoSuchJobInstanceException(msg);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.springframework.batch.io.exception.AbstractExceptionTests#getException(java.
|
||||
* lang.String, java.lang.Throwable)
|
||||
*/
|
||||
@Override
|
||||
public Exception getException(String msg, Throwable t) throws Exception {
|
||||
return new NoSuchJobInstanceException(msg, t);
|
||||
|
||||
@@ -608,11 +608,6 @@ class MulticasterBatchListenerTests {
|
||||
super.onReadError(ex);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.springframework.batch.core.listener.StepListenerSupport#afterChunk ()
|
||||
*/
|
||||
@Override
|
||||
public void afterChunk(ChunkContext context) {
|
||||
count++;
|
||||
@@ -622,12 +617,6 @@ class MulticasterBatchListenerTests {
|
||||
super.afterChunk(context);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.springframework.batch.core.listener.StepListenerSupport#afterRead
|
||||
* (java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public void afterRead(Integer item) {
|
||||
count++;
|
||||
@@ -637,12 +626,6 @@ class MulticasterBatchListenerTests {
|
||||
super.afterRead(item);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.springframework.batch.core.listener.StepListenerSupport#afterStep
|
||||
* (org.springframework.batch.core.StepExecution)
|
||||
*/
|
||||
@Nullable
|
||||
@Override
|
||||
public ExitStatus afterStep(StepExecution stepExecution) {
|
||||
@@ -653,11 +636,6 @@ class MulticasterBatchListenerTests {
|
||||
return super.afterStep(stepExecution);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.springframework.batch.core.listener.StepListenerSupport#beforeChunk ()
|
||||
*/
|
||||
@Override
|
||||
public void beforeChunk(ChunkContext context) {
|
||||
count++;
|
||||
@@ -667,11 +645,6 @@ class MulticasterBatchListenerTests {
|
||||
super.beforeChunk(context);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.springframework.batch.core.listener.StepListenerSupport#beforeRead ()
|
||||
*/
|
||||
@Override
|
||||
public void beforeRead() {
|
||||
count++;
|
||||
@@ -681,12 +654,6 @@ class MulticasterBatchListenerTests {
|
||||
super.beforeRead();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.springframework.batch.core.listener.StepListenerSupport#beforeStep
|
||||
* (org.springframework.batch.core.StepExecution)
|
||||
*/
|
||||
@Override
|
||||
public void beforeStep(StepExecution stepExecution) {
|
||||
count++;
|
||||
@@ -696,12 +663,6 @@ class MulticasterBatchListenerTests {
|
||||
super.beforeStep(stepExecution);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.springframework.batch.core.listener.StepListenerSupport#afterWrite
|
||||
* (java.util.List)
|
||||
*/
|
||||
@Override
|
||||
public void afterWrite(Chunk<? extends String> items) {
|
||||
count++;
|
||||
@@ -711,12 +672,6 @@ class MulticasterBatchListenerTests {
|
||||
super.afterWrite(items);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.springframework.batch.core.listener.StepListenerSupport#beforeWrite
|
||||
* (java.util.List)
|
||||
*/
|
||||
@Override
|
||||
public void beforeWrite(Chunk<? extends String> items) {
|
||||
count++;
|
||||
@@ -726,12 +681,6 @@ class MulticasterBatchListenerTests {
|
||||
super.beforeWrite(items);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.springframework.batch.core.listener.StepListenerSupport#onWriteError
|
||||
* (java.lang.Exception, java.util.List)
|
||||
*/
|
||||
@Override
|
||||
public void onWriteError(Exception exception, Chunk<? extends String> items) {
|
||||
count++;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2013 the original author or authors.
|
||||
* Copyright 2006-2023 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,25 +23,11 @@ import org.springframework.batch.core.AbstractExceptionTests;
|
||||
*/
|
||||
public class JobExecutionAlreadyRunningExceptionTests extends AbstractExceptionTests {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.springframework.batch.io.exception.AbstractExceptionTests#getException(java.
|
||||
* lang.String)
|
||||
*/
|
||||
@Override
|
||||
public Exception getException(String msg) throws Exception {
|
||||
return new JobExecutionAlreadyRunningException(msg);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.springframework.batch.io.exception.AbstractExceptionTests#getException(java.
|
||||
* lang.String, java.lang.Throwable)
|
||||
*/
|
||||
@Override
|
||||
public Exception getException(String msg, Throwable t) throws Exception {
|
||||
return new JobExecutionAlreadyRunningException(msg, t);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2013 the original author or authors.
|
||||
* Copyright 2006-2023 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,25 +23,11 @@ import org.springframework.batch.core.AbstractExceptionTests;
|
||||
*/
|
||||
public class JobInstanceAlreadyCompleteExceptionTests extends AbstractExceptionTests {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.springframework.batch.io.exception.AbstractExceptionTests#getException(java.
|
||||
* lang.String)
|
||||
*/
|
||||
@Override
|
||||
public Exception getException(String msg) throws Exception {
|
||||
return new JobInstanceAlreadyCompleteException(msg);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.springframework.batch.io.exception.AbstractExceptionTests#getException(java.
|
||||
* lang.String, java.lang.Throwable)
|
||||
*/
|
||||
@Override
|
||||
public Exception getException(String msg, Throwable t) throws Exception {
|
||||
return new JobInstanceAlreadyCompleteException(msg, t);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2013 the original author or authors.
|
||||
* Copyright 2006-2023 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,25 +23,11 @@ import org.springframework.batch.core.AbstractExceptionTests;
|
||||
*/
|
||||
public class JobRestartExceptionTests extends AbstractExceptionTests {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.springframework.batch.io.exception.AbstractExceptionTests#getException(java.
|
||||
* lang.String)
|
||||
*/
|
||||
@Override
|
||||
public Exception getException(String msg) throws Exception {
|
||||
return new JobRestartException(msg);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.springframework.batch.io.exception.AbstractExceptionTests#getException(java.
|
||||
* lang.String, java.lang.Throwable)
|
||||
*/
|
||||
@Override
|
||||
public Exception getException(String msg, Throwable t) throws Exception {
|
||||
return new JobRestartException(msg, t);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2022 the original author or authors.
|
||||
* Copyright 2006-2023 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.
|
||||
@@ -32,40 +32,16 @@ import org.springframework.lang.Nullable;
|
||||
*/
|
||||
public class JobRepositorySupport implements JobRepository {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.springframework.batch.container.common.repository.JobRepository#findOrCreateJob
|
||||
* (org.springframework.batch.container.common.domain.JobConfiguration)
|
||||
*/
|
||||
@Override
|
||||
public JobExecution createJobExecution(String jobName, JobParameters jobParameters) {
|
||||
JobInstance jobInstance = new JobInstance(0L, jobName);
|
||||
return new JobExecution(jobInstance, 11L, jobParameters);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.springframework.batch.container.common.repository.JobRepository#saveOrUpdate(
|
||||
* org.springframework.batch.container.common.domain.JobExecution)
|
||||
*/
|
||||
@Override
|
||||
public void update(JobExecution jobExecution) {
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.springframework.batch.container.common.repository.JobRepository#update(org.
|
||||
* springframework.batch.container.common.domain.Job)
|
||||
*/
|
||||
public void update(JobInstance job) {
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public JobInstance getJobInstance(String jobName, JobParameters jobParameters) {
|
||||
@@ -83,14 +59,6 @@ public class JobRepositorySupport implements JobRepository {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public int getJobExecutionCount(JobInstance jobInstance) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public JobExecution getLastJobExecution(JobInstance jobInstance) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void add(StepExecution stepExecution) {
|
||||
}
|
||||
@@ -103,13 +71,6 @@ public class JobRepositorySupport implements JobRepository {
|
||||
public void updateExecutionContext(StepExecution stepExecution) {
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.springframework.batch.core.repository.JobRepository#isJobInstanceExists(java.
|
||||
* lang.String, org.springframework.batch.core.JobParameters)
|
||||
*/
|
||||
@Override
|
||||
public boolean isJobInstanceExists(String jobName, JobParameters jobParameters) {
|
||||
return false;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2007 the original author or authors.
|
||||
* Copyright 2006-2023 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,13 +23,6 @@ import org.springframework.batch.core.AbstractExceptionWithCauseTests;
|
||||
*/
|
||||
public class ForceRollbackForWriteSkipExceptionTests extends AbstractExceptionWithCauseTests {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.springframework.batch.core.listener.AbstractDoubleExceptionTests#getException(
|
||||
* java.lang.String, java.lang.RuntimeException, java.lang.Throwable)
|
||||
*/
|
||||
@Override
|
||||
public Exception getException(String msg, Throwable e) throws Exception {
|
||||
return new ForceRollbackForWriteSkipException(msg, e);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2007 the original author or authors.
|
||||
* Copyright 2006-2023 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,13 +23,6 @@ import org.springframework.batch.core.AbstractExceptionWithCauseTests;
|
||||
*/
|
||||
public class NonSkippableReadExceptionTests extends AbstractExceptionWithCauseTests {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.springframework.batch.core.listener.AbstractDoubleExceptionTests#getException(
|
||||
* java.lang.String, java.lang.RuntimeException, java.lang.Throwable)
|
||||
*/
|
||||
@Override
|
||||
public Exception getException(String msg, Throwable e) throws Exception {
|
||||
return new NonSkippableReadException(msg, e);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2007 the original author or authors.
|
||||
* Copyright 2006-2023 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,13 +23,6 @@ import org.springframework.batch.core.AbstractExceptionWithCauseTests;
|
||||
*/
|
||||
public class NonSkippableWriteExceptionTests extends AbstractExceptionWithCauseTests {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.springframework.batch.core.listener.AbstractDoubleExceptionTests#getException(
|
||||
* java.lang.String, java.lang.RuntimeException, java.lang.Throwable)
|
||||
*/
|
||||
@Override
|
||||
public Exception getException(String msg, Throwable e) throws Exception {
|
||||
return new NonSkippableWriteException(msg, e);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2007 the original author or authors.
|
||||
* Copyright 2006-2023 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,13 +23,6 @@ import org.springframework.batch.core.listener.AbstractDoubleExceptionTests;
|
||||
*/
|
||||
public class SkipListenerFailedExceptionTests extends AbstractDoubleExceptionTests {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.springframework.batch.core.listener.AbstractDoubleExceptionTests#getException(
|
||||
* java.lang.String, java.lang.RuntimeException, java.lang.Throwable)
|
||||
*/
|
||||
@Override
|
||||
public Exception getException(String msg, RuntimeException cause, Throwable e) throws Exception {
|
||||
return new SkipListenerFailedException(msg, cause, e);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2007 the original author or authors.
|
||||
* Copyright 2006-2023 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,13 +23,6 @@ import org.springframework.batch.core.listener.AbstractDoubleExceptionTests;
|
||||
*/
|
||||
public class SkipPolicyFailedExceptionTests extends AbstractDoubleExceptionTests {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.springframework.batch.core.listener.AbstractDoubleExceptionTests#getException(
|
||||
* java.lang.String, java.lang.RuntimeException, java.lang.Throwable)
|
||||
*/
|
||||
@Override
|
||||
public Exception getException(String msg, RuntimeException cause, Throwable e) throws Exception {
|
||||
return new SkipPolicyFailedException(msg, cause, e);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2019 the original author or authors.
|
||||
* Copyright 2006-2023 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,11 +31,6 @@ import org.springframework.jdbc.core.RowMapper;
|
||||
*/
|
||||
public class PlayerSummaryMapper implements RowMapper<PlayerSummary> {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.springframework.jdbc.core.RowMapper#mapRow(java.sql.ResultSet, int)
|
||||
*/
|
||||
@Override
|
||||
public PlayerSummary mapRow(ResultSet rs, int rowNum) throws SQLException {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2019 the original author or authors.
|
||||
* Copyright 2006-2023 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,11 +31,6 @@ import org.springframework.jdbc.core.RowMapper;
|
||||
*/
|
||||
public class PlayerSummaryRowMapper implements RowMapper<PlayerSummary> {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.springframework.jdbc.core.RowMapper#mapRow(java.sql.ResultSet, int)
|
||||
*/
|
||||
@Override
|
||||
public PlayerSummary mapRow(ResultSet rs, int rowNum) throws SQLException {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2005-2019 the original author or authors.
|
||||
* Copyright 2005-2023 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,6 +30,7 @@ import org.springframework.ldap.core.LdapAttributes;
|
||||
*/
|
||||
public class MyMapper implements RecordMapper<LdapAttributes> {
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public LdapAttributes mapRecord(LdapAttributes attributes) {
|
||||
return attributes;
|
||||
|
||||
@@ -21,13 +21,11 @@ import java.util.List;
|
||||
|
||||
import org.springframework.batch.core.Job;
|
||||
import org.springframework.batch.core.JobExecution;
|
||||
import org.springframework.batch.core.JobParametersIncrementer;
|
||||
import org.springframework.batch.core.JobParametersValidator;
|
||||
import org.springframework.batch.core.Step;
|
||||
import org.springframework.batch.core.UnexpectedJobExecutionException;
|
||||
import org.springframework.batch.core.job.DefaultJobParametersValidator;
|
||||
import org.springframework.beans.factory.BeanNameAware;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.ClassUtils;
|
||||
|
||||
/**
|
||||
@@ -46,8 +44,6 @@ public class JobSupport implements BeanNameAware, Job {
|
||||
|
||||
private boolean restartable = false;
|
||||
|
||||
private int startLimit = Integer.MAX_VALUE;
|
||||
|
||||
private JobParametersValidator jobParametersValidator = new DefaultJobParametersValidator();
|
||||
|
||||
/**
|
||||
@@ -93,11 +89,6 @@ public class JobSupport implements BeanNameAware, Job {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.springframework.batch.core.domain.IJob#getName()
|
||||
*/
|
||||
@Override
|
||||
public String getName() {
|
||||
return name;
|
||||
@@ -123,56 +114,20 @@ public class JobSupport implements BeanNameAware, Job {
|
||||
return steps;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.springframework.batch.core.domain.IJob#getStartLimit()
|
||||
*/
|
||||
public int getStartLimit() {
|
||||
return startLimit;
|
||||
}
|
||||
|
||||
public void setStartLimit(int startLimit) {
|
||||
this.startLimit = startLimit;
|
||||
}
|
||||
|
||||
public void setRestartable(boolean restartable) {
|
||||
this.restartable = restartable;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.springframework.batch.core.domain.IJob#isRestartable()
|
||||
*/
|
||||
@Override
|
||||
public boolean isRestartable() {
|
||||
return restartable;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.springframework.batch.core.Job#getJobParametersIncrementer()
|
||||
*/
|
||||
@Nullable
|
||||
@Override
|
||||
public JobParametersIncrementer getJobParametersIncrementer() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JobParametersValidator getJobParametersValidator() {
|
||||
return jobParametersValidator;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.springframework.batch.core.domain.Job#run(org.springframework.batch.core.domain
|
||||
* .JobExecution)
|
||||
*/
|
||||
@Override
|
||||
public void execute(JobExecution execution) throws UnexpectedJobExecutionException {
|
||||
throw new UnsupportedOperationException(
|
||||
|
||||
Reference in New Issue
Block a user