Tidy up some exception class names
This commit is contained in:
@@ -22,7 +22,7 @@ import java.util.List;
|
||||
import org.springframework.batch.core.domain.Job;
|
||||
import org.springframework.batch.core.domain.JobExecution;
|
||||
import org.springframework.batch.core.domain.Step;
|
||||
import org.springframework.batch.io.exception.BatchCriticalException;
|
||||
import org.springframework.batch.io.exception.InfrastructureException;
|
||||
import org.springframework.beans.factory.BeanNameAware;
|
||||
import org.springframework.util.ClassUtils;
|
||||
|
||||
@@ -136,7 +136,7 @@ public class JobSupport implements BeanNameAware, Job {
|
||||
/* (non-Javadoc)
|
||||
* @see org.springframework.batch.core.domain.Job#run(org.springframework.batch.core.domain.JobExecution)
|
||||
*/
|
||||
public void execute(JobExecution execution) throws BatchCriticalException {
|
||||
public void execute(JobExecution execution) throws InfrastructureException {
|
||||
throw new UnsupportedOperationException("JobSupport does not provide an implementation of run(). Use a smarter subclass.");
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ package org.springframework.batch.core.domain;
|
||||
import org.springframework.batch.core.domain.JobInterruptedException;
|
||||
import org.springframework.batch.core.domain.Step;
|
||||
import org.springframework.batch.core.domain.StepExecution;
|
||||
import org.springframework.batch.io.exception.BatchCriticalException;
|
||||
import org.springframework.batch.io.exception.InfrastructureException;
|
||||
import org.springframework.beans.factory.BeanNameAware;
|
||||
|
||||
/**
|
||||
@@ -110,7 +110,7 @@ public class StepSupport implements Step, BeanNameAware {
|
||||
*
|
||||
* @see org.springframework.batch.core.domain.Step#execute(org.springframework.batch.core.domain.StepExecution)
|
||||
*/
|
||||
public void execute(StepExecution stepExecution) throws JobInterruptedException, BatchCriticalException {
|
||||
public void execute(StepExecution stepExecution) throws JobInterruptedException, InfrastructureException {
|
||||
throw new UnsupportedOperationException(
|
||||
"Cannot process a StepExecution. Use a smarter subclass of StepSupport.");
|
||||
}
|
||||
|
||||
@@ -21,14 +21,14 @@ import org.springframework.batch.core.AbstractExceptionTests;
|
||||
* @author Dave Syer
|
||||
*
|
||||
*/
|
||||
public class BatchRestartExceptionTests extends AbstractExceptionTests {
|
||||
public class JobRestartExceptionTests extends AbstractExceptionTests {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.batch.io.exception.AbstractExceptionTests#getException(java.lang.String)
|
||||
*/
|
||||
public Exception getException(String msg) throws Exception {
|
||||
return new BatchRestartException(msg);
|
||||
return new JobRestartException(msg);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -37,7 +37,7 @@ public class BatchRestartExceptionTests extends AbstractExceptionTests {
|
||||
* java.lang.Throwable)
|
||||
*/
|
||||
public Exception getException(String msg, Throwable t) throws Exception {
|
||||
return new BatchRestartException(msg, t);
|
||||
return new JobRestartException(msg, t);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
/*
|
||||
* Copyright 2006-2007 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.core.repository;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
/**
|
||||
* @author Dave Syer
|
||||
*
|
||||
*/
|
||||
public class NoSuchBatchDomainObjectExceptionTests extends TestCase {
|
||||
|
||||
public void testCreateException() throws Exception {
|
||||
NoSuchBatchDomainObjectException e = new NoSuchBatchDomainObjectException("Foo");
|
||||
assertEquals("Foo", e.getMessage());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user