Remove redundant throws declarations from public APIs

Closes gh-31179
pull/31190/head
Andy Wilkinson 3 years ago
parent 5dfa5adb75
commit 26b89bfc80

@ -40,7 +40,6 @@ import org.springframework.batch.core.converter.DefaultJobParametersConverter;
import org.springframework.batch.core.converter.JobParametersConverter; import org.springframework.batch.core.converter.JobParametersConverter;
import org.springframework.batch.core.explore.JobExplorer; import org.springframework.batch.core.explore.JobExplorer;
import org.springframework.batch.core.launch.JobLauncher; import org.springframework.batch.core.launch.JobLauncher;
import org.springframework.batch.core.launch.JobParametersNotFoundException;
import org.springframework.batch.core.launch.NoSuchJobException; import org.springframework.batch.core.launch.NoSuchJobException;
import org.springframework.batch.core.repository.JobExecutionAlreadyRunningException; import org.springframework.batch.core.repository.JobExecutionAlreadyRunningException;
import org.springframework.batch.core.repository.JobInstanceAlreadyCompleteException; import org.springframework.batch.core.repository.JobInstanceAlreadyCompleteException;
@ -192,9 +191,8 @@ public class JobLauncherApplicationRunner implements ApplicationRunner, Ordered,
} }
} }
protected void execute(Job job, JobParameters jobParameters) protected void execute(Job job, JobParameters jobParameters) throws JobExecutionAlreadyRunningException,
throws JobExecutionAlreadyRunningException, JobRestartException, JobInstanceAlreadyCompleteException, JobRestartException, JobInstanceAlreadyCompleteException, JobParametersInvalidException {
JobParametersInvalidException, JobParametersNotFoundException {
JobParameters parameters = getNextJobParameters(job, jobParameters); JobParameters parameters = getNextJobParameters(job, jobParameters);
JobExecution execution = this.jobLauncher.run(job, parameters); JobExecution execution = this.jobLauncher.run(job, parameters);
if (this.publisher != null) { if (this.publisher != null) {

@ -108,7 +108,7 @@ public class ExplodedArchive implements Archive {
return new EntryIterator(this.root, this.recursive, null, null); return new EntryIterator(this.root, this.recursive, null, null);
} }
protected Archive getNestedArchive(Entry entry) throws IOException { protected Archive getNestedArchive(Entry entry) {
File file = ((FileEntry) entry).getFile(); File file = ((FileEntry) entry).getFile();
return (file.isDirectory() ? new ExplodedArchive(file) : new SimpleJarFileArchive((FileEntry) entry)); return (file.isDirectory() ? new ExplodedArchive(file) : new SimpleJarFileArchive((FileEntry) entry));
} }

Loading…
Cancel
Save