[BATCH-430] Renamed InfrastructureException to UnexpectedJobExecutionException

This commit is contained in:
nebhale
2008-03-07 14:29:51 +00:00
parent 609ce9d347
commit cce1b29f6d
22 changed files with 57 additions and 57 deletions

View File

@@ -16,7 +16,7 @@
package org.springframework.batch.sample;
import org.springframework.batch.core.InfrastructureException;
import org.springframework.batch.core.UnexpectedJobExecutionException;
import org.springframework.batch.core.JobParameters;
import org.springframework.jdbc.core.JdbcOperations;
@@ -63,7 +63,7 @@ public class RestartFunctionalTests extends AbstractBatchLauncherTests {
runJob();
fail("First run of the job is expected to fail.");
}
catch (InfrastructureException expected) {
catch (UnexpectedJobExecutionException expected) {
//expected
assertTrue("Not planned exception: "+expected.getMessage(), expected.getMessage().toLowerCase().indexOf("planned")>=0);
}

View File

@@ -3,7 +3,7 @@ package org.springframework.batch.sample.item.writer;
import junit.framework.TestCase;
import org.easymock.MockControl;
import org.springframework.batch.core.InfrastructureException;
import org.springframework.batch.core.UnexpectedJobExecutionException;
import org.springframework.batch.item.ItemWriter;
import org.springframework.batch.sample.domain.Order;
import org.springframework.batch.sample.item.writer.OrderWriter;
@@ -46,7 +46,7 @@ public class OrderWriterTests extends TestCase {
try {
processor.write(this);
fail("Batch critical exception was expected");
} catch (InfrastructureException bce) {
} catch (UnexpectedJobExecutionException bce) {
assertTrue(true);
}
writerControl.verify();

View File

@@ -4,7 +4,7 @@ import java.util.ArrayList;
import junit.framework.TestCase;
import org.springframework.batch.core.InfrastructureException;
import org.springframework.batch.core.UnexpectedJobExecutionException;
import org.springframework.batch.item.reader.ListItemReader;
import org.springframework.batch.repeat.context.RepeatContextSupport;
import org.springframework.batch.repeat.synch.RepeatSynchronizationManager;
@@ -40,7 +40,7 @@ public class ExceptionThrowingItemReaderProxyTests extends TestCase {
try {
itemReader.read();
assertTrue(i < ITER_COUNT);
} catch (InfrastructureException bce) {
} catch (UnexpectedJobExecutionException bce) {
assertEquals(ITER_COUNT,i);
}
}

View File

@@ -19,7 +19,7 @@ package org.springframework.batch.sample.tasklet;
import java.util.ArrayList;
import java.util.List;
import org.springframework.batch.core.InfrastructureException;
import org.springframework.batch.core.UnexpectedJobExecutionException;
import org.springframework.batch.core.Job;
import org.springframework.batch.core.JobExecution;
import org.springframework.batch.core.Step;
@@ -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 InfrastructureException {
public void execute(JobExecution execution) throws UnexpectedJobExecutionException {
throw new UnsupportedOperationException("JobSupport does not provide an implementation of run(). Use a smarter subclass.");
}

View File

@@ -15,7 +15,7 @@
*/
package org.springframework.batch.sample.tasklet;
import org.springframework.batch.core.InfrastructureException;
import org.springframework.batch.core.UnexpectedJobExecutionException;
import org.springframework.batch.core.JobInterruptedException;
import org.springframework.batch.core.Step;
import org.springframework.batch.core.StepExecution;
@@ -110,7 +110,7 @@ public class StepSupport implements Step, BeanNameAware {
*
* @see org.springframework.batch.core.Step#execute(org.springframework.batch.core.StepExecution)
*/
public void execute(StepExecution stepExecution) throws JobInterruptedException, InfrastructureException {
public void execute(StepExecution stepExecution) throws JobInterruptedException, UnexpectedJobExecutionException {
throw new UnsupportedOperationException(
"Cannot process a StepExecution. Use a smarter subclass of StepSupport.");
}