From a71c4b0ad0e4c0dcb558cc3179d668f9546f9cf7 Mon Sep 17 00:00:00 2001 From: dsyer Date: Tue, 19 Jan 2010 08:57:04 +0000 Subject: [PATCH] BATCH-1498: fixed typo in AbstractStepParser --- .../configuration/xml/AbstractStepParser.java | 4 +- .../src/main/resources/META-INF/MANIFEST.MF | 179 ------------------ .../xml/PartitionStepParserTests.java | 8 +- .../xml/PartitionStepParserTests-context.xml | 1 + 4 files changed, 7 insertions(+), 185 deletions(-) delete mode 100644 spring-batch-core/src/main/resources/META-INF/MANIFEST.MF diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/AbstractStepParser.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/AbstractStepParser.java index f14d8cc66..28104c834 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/AbstractStepParser.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/AbstractStepParser.java @@ -162,11 +162,11 @@ public abstract class AbstractStepParser { if (!StringUtils.hasText(handlerRef)) { Element handlerElement = DomUtils.getChildElementByTagName(partitionElement, HANDLER_ELE); if (handlerElement != null) { - String taskExecutorRef = partitionElement.getAttribute(TASK_EXECUTOR_ATTR); + String taskExecutorRef = handlerElement.getAttribute(TASK_EXECUTOR_ATTR); if (StringUtils.hasText(taskExecutorRef)) { propertyValues.addPropertyValue("taskExecutor", new RuntimeBeanReference(taskExecutorRef)); } - String gridSize = partitionElement.getAttribute(GRID_SIZE_ATTR); + String gridSize = handlerElement.getAttribute(GRID_SIZE_ATTR); if (StringUtils.hasText(gridSize)) { propertyValues.addPropertyValue("gridSize", new TypedStringValue(gridSize)); } diff --git a/spring-batch-core/src/main/resources/META-INF/MANIFEST.MF b/spring-batch-core/src/main/resources/META-INF/MANIFEST.MF deleted file mode 100644 index c4012b4d7..000000000 --- a/spring-batch-core/src/main/resources/META-INF/MANIFEST.MF +++ /dev/null @@ -1,179 +0,0 @@ -Manifest-Version: 1.0 -Bundle-Name: Spring Batch Core -Bundle-Classpath: . -Archiver-Version: Plexus Archiver -Build-Jdk: 1.5.0_13 -Built-By: dsyer -Created-By: Apache Maven -Import-Package: com.thoughtworks.xstream;version="[1.3,1.4)",com.thoug - htworks.xstream.converters.reflection;version="[1.3,1.4)",com.thought - works.xstream.io;version="[1.3,1.4)",com.thoughtworks.xstream.io.json - ;version="[1.3,1.4)",javax.sql,org.aopalliance.aop;version="[1.0.0, 2 - .0.0)",org.aopalliance.intercept;version="[1.0.0, 2.0.0)",org.apache. - commons.lang;version="[2.1,3.0)";resolution:=optional,org.apache.comm - ons.lang.builder;version="[2.1,3.0)";resolution:=optional,org.apache. - commons.lang.time;version="[2.1,3.0)";resolution:=optional,org.apache - .commons.logging;version="[1.1.0, 2.0.0)",org.aspectj.lang.annotation - ;version="[1.5.2,1.7.0)",org.osgi.framework,org.springframework.aop;v - ersion="[2.5.5, 3.0.0)",org.springframework.aop.framework;version="[2 - .5.5, 3.0.0)",org.springframework.aop.framework.autoproxy;version="[2 - .5.5, 3.0.0)",org.springframework.aop.scope;version="[2.5.5, 3.0.0)", - org.springframework.aop.support;version="[2.5.5, 3.0.0)",org.springfr - amework.aop.target;version="[2.5.5, 3.0.0)",org.springframework.batch - .item;version="[2.0.0, 3.0.0)",org.springframework.batch.item.adapter - ;version="[2.0.0, 3.0.0)",org.springframework.batch.item.database.sup - port;version="[2.0.0, 3.0.0)",org.springframework.batch.item.support; - version="[2.0.0, 3.0.0)",org.springframework.batch.repeat;version="[2 - .0.0, 3.0.0)",org.springframework.batch.repeat.context;version="[2.0. - 0, 3.0.0)",org.springframework.batch.repeat.exception;version="[2.0.0 - , 3.0.0)",org.springframework.batch.repeat.listener;version="[2.0.0, - 3.0.0)",org.springframework.batch.repeat.policy;version="[2.0.0, 3.0. - 0)",org.springframework.batch.repeat.support;version="[2.0.0, 3.0.0)" - ,org.springframework.batch.retry;version="[2.0.0, 3.0.0)",org.springf - ramework.batch.retry.backoff;version="[2.0.0, 3.0.0)",org.springframe - work.batch.retry.context;version="[2.0.0, 3.0.0)",org.springframework - .batch.retry.listener;version="[2.0.0, 3.0.0)",org.springframework.ba - tch.retry.policy;version="[2.0.0, 3.0.0)",org.springframework.batch.r - etry.support;version="[2.0.0, 3.0.0)",org.springframework.batch.suppo - rt;version="[2.0.0, 3.0.0)",org.springframework.batch.support.transac - tion;version="[2.0.0, 3.0.0)",org.springframework.beans;version="[2.5 - .5, 3.0.0)",org.springframework.beans.factory;version="[2.5.5, 3.0.0) - ",org.springframework.beans.factory.annotation;version="[2.5.5, 3.0.0 - )",org.springframework.beans.factory.config;version="[2.5.5, 3.0.0)", - org.springframework.beans.factory.parsing;version="[2.5.5, 3.0.0)",or - g.springframework.beans.factory.support;version="[2.5.5, 3.0.0)",org. - springframework.beans.factory.xml;version="[2.5.5, 3.0.0)",org.spring - framework.context;version="[2.5.5, 3.0.0)",org.springframework.contex - t.support;version="[2.5.5, 3.0.0)",org.springframework.core;version=" - [2.5.5, 3.0.0)",org.springframework.core.annotation;version="[2.5.5, - 3.0.0)",org.springframework.core.io;version="[2.5.5, 3.0.0)",org.spri - ngframework.core.task;version="[2.5.5, 3.0.0)",org.springframework.da - o;version="[2.5.5, 3.0.0)";resolution:=optional,org.springframework.j - dbc.core;version="[2.5.5, 3.0.0)";resolution:=optional,org.springfram - ework.jdbc.core.simple;version="[2.5.5, 3.0.0)";resolution:=optional, - org.springframework.jdbc.support.incrementer;version="[2.5.5, 3.0.0)" - ;resolution:=optional,org.springframework.jdbc.support.lob;version="[ - 2.5.5, 3.0.0)";resolution:=optional,org.springframework.osgi.context; - version="[1.1.0, 2.0.0)";resolution:=optional,org.springframework.osg - i.context.support;version="[1.1.0, 2.0.0)";resolution:=optional,org.s - pringframework.transaction;version="[2.5.5, 3.0.0)";resolution:=optio - nal,org.springframework.transaction.annotation;version="[2.5.5, 3.0.0 - )";resolution:=optional,org.springframework.transaction.interceptor;v - ersion="[2.5.5, 3.0.0)";resolution:=optional,org.springframework.util - ;version="[2.5.5, 3.0.0)";resolution:=optional,org.springframework.ut - il.xml;version="[2.5.5, 3.0.0)";resolution:=optional,org.w3c.dom -Bundle-Vendor: Spring -Bundle-SymbolicName: org.springframework.batch.core -Export-Package: org.springframework.batch.core;version="2.0.0.CI-SNAPS - HOT";uses:="org.springframework.batch.item",org.springframework.batch - .core.annotation;version="2.0.0.CI-SNAPSHOT";uses:="org.springframewo - rk.beans.factory.annotation",org.springframework.batch.core.configura - tion;version="2.0.0.CI-SNAPSHOT";uses:="org.springframework.batch.cor - e,org.springframework.batch.core.launch",org.springframework.batch.co - re.configuration.support;version="2.0.0.CI-SNAPSHOT";uses:="org.osgi. - framework,org.springframework.batch.core,org.springframework.batch.co - re.configuration,org.springframework.batch.core.launch,org.springfram - ework.beans,org.springframework.beans.factory,org.springframework.bea - ns.factory.config,org.springframework.context,org.springframework.con - text.support,org.springframework.core.io,org.springframework.osgi.con - text",org.springframework.batch.core.configuration.util;version="2.0. - 0.CI-SNAPSHOT";uses:="org.springframework.util",org.springframework.b - atch.core.configuration.xml;version="2.0.0.CI-SNAPSHOT";uses:="org.sp - ringframework.beans.factory.config,org.springframework.beans.factory. - support,org.springframework.beans.factory.xml,org.w3c.dom",org.spring - framework.batch.core.converter;version="2.0.0.CI-SNAPSHOT";uses:="org - .springframework.batch.core",org.springframework.batch.core.explore;v - ersion="2.0.0.CI-SNAPSHOT";uses:="org.springframework.batch.core",org - .springframework.batch.core.explore.support;version="2.0.0.CI-SNAPSHO - T";uses:="javax.sql,org.springframework.batch.core,org.springframewor - k.batch.core.explore,org.springframework.batch.core.repository.dao,or - g.springframework.beans.factory,org.springframework.jdbc.support.incr - ementer",org.springframework.batch.core.job;version="2.0.0.CI-SNAPSHO - T";uses:="org.springframework.batch.core,org.springframework.batch.co - re.repository,org.springframework.beans.factory",org.springframework. - batch.core.job.flow;version="2.0.0.CI-SNAPSHOT";uses:="org.springfram - ework.batch.core,org.springframework.batch.core.job,org.springframewo - rk.batch.core.repository",org.springframework.batch.core.job.flow.sup - port;version="2.0.0.CI-SNAPSHOT";uses:="org.springframework.batch.cor - e.job.flow,org.springframework.beans.factory",org.springframework.bat - ch.core.job.flow.support.state;version="2.0.0.CI-SNAPSHOT";uses:="org - .springframework.batch.core,org.springframework.batch.core.job.flow,o - rg.springframework.batch.core.job.flow.support,org.springframework.co - re.task",org.springframework.batch.core.job.flow.support.util;version - ="2.0.0.CI-SNAPSHOT",org.springframework.batch.core.launch;version="2 - .0.0.CI-SNAPSHOT";uses:="org.springframework.batch.core,org.springfra - mework.batch.core.repository",org.springframework.batch.core.launch.s - upport;version="2.0.0.CI-SNAPSHOT";uses:="org.aopalliance.intercept,o - rg.springframework.batch.core,org.springframework.batch.core.configur - ation,org.springframework.batch.core.converter,org.springframework.ba - tch.core.explore,org.springframework.batch.core.launch,org.springfram - ework.batch.core.repository,org.springframework.beans.factory,org.spr - ingframework.core.task,org.springframework.transaction.annotation",or - g.springframework.batch.core.listener;version="2.0.0.CI-SNAPSHOT";use - s:="org.aopalliance.intercept,org.springframework.batch.core,org.spri - ngframework.batch.core.configuration.util,org.springframework.beans.f - actory",org.springframework.batch.core.partition;version="2.0.0.CI-SN - APSHOT";uses:="org.springframework.batch.core",org.springframework.ba - tch.core.partition.support;version="2.0.0.CI-SNAPSHOT";uses:="org.spr - ingframework.batch.core,org.springframework.batch.core.partition,org. - springframework.batch.core.repository,org.springframework.batch.core. - step,org.springframework.beans.factory,org.springframework.core.task" - ,org.springframework.batch.core.repository;version="2.0.0.CI-SNAPSHOT - ";uses:="org.springframework.batch.core",org.springframework.batch.co - re.repository.dao;version="2.0.0.CI-SNAPSHOT";uses:="com.thoughtworks - .xstream.converters.reflection,com.thoughtworks.xstream.io,org.spring - framework.batch.core,org.springframework.batch.item,org.springframewo - rk.beans.factory,org.springframework.dao,org.springframework.jdbc.cor - e,org.springframework.jdbc.core.simple,org.springframework.jdbc.suppo - rt.incrementer,org.springframework.jdbc.support.lob",org.springframew - ork.batch.core.repository.support;version="2.0.0.CI-SNAPSHOT";uses:=" - javax.sql,org.springframework.batch.core,org.springframework.batch.co - re.repository,org.springframework.batch.core.repository.dao,org.sprin - gframework.batch.item.database.support,org.springframework.beans.fact - ory,org.springframework.transaction",org.springframework.batch.core.r - esource;version="2.0.0.CI-SNAPSHOT";uses:="org.springframework.batch. - core,org.springframework.batch.core.converter,org.springframework.bat - ch.core.listener,org.springframework.batch.repeat,org.springframework - .beans.factory,org.springframework.context,org.springframework.core.i - o,org.springframework.jdbc.core",org.springframework.batch.core.scope - ;version="2.0.0.CI-SNAPSHOT";uses:="org.springframework.beans,org.spr - ingframework.beans.factory,org.springframework.beans.factory.config,o - rg.springframework.beans.factory.support,org.springframework.core,org - .springframework.util",org.springframework.batch.core.scope.context;v - ersion="2.0.0.CI-SNAPSHOT";uses:="org.aspectj.lang.annotation,org.spr - ingframework.batch.core,org.springframework.batch.repeat,org.springfr - amework.batch.repeat.context,org.springframework.core",org.springfram - ework.batch.core.scope.util;version="2.0.0.CI-SNAPSHOT";uses:="org.sp - ringframework.aop.framework,org.springframework.aop.target,org.spring - framework.beans,org.springframework.beans.factory,org.springframework - .beans.factory.config,org.springframework.beans.factory.support,org.s - pringframework.core,org.springframework.util",org.springframework.bat - ch.core.step;version="2.0.0.CI-SNAPSHOT";uses:="org.springframework.b - atch.core,org.springframework.batch.core.listener,org.springframework - .batch.core.repository,org.springframework.batch.item,org.springframe - work.beans.factory",org.springframework.batch.core.step.item;version= - "2.0.0.CI-SNAPSHOT";uses:="org.apache.commons.logging,org.springframe - work.batch.core,org.springframework.batch.core.listener,org.springfra - mework.batch.core.repository,org.springframework.batch.core.scope.con - text,org.springframework.batch.core.step.skip,org.springframework.bat - ch.core.step.tasklet,org.springframework.batch.item,org.springframewo - rk.batch.repeat,org.springframework.batch.repeat.exception,org.spring - framework.batch.repeat.listener,org.springframework.batch.retry,org.s - pringframework.batch.retry.backoff,org.springframework.batch.retry.co - ntext,org.springframework.batch.retry.listener,org.springframework.ba - tch.retry.policy,org.springframework.batch.retry.support,org.springfr - amework.batch.support,org.springframework.beans.factory,org.springfra - mework.core.task,org.springframework.transaction,org.springframework. - transaction.interceptor",org.springframework.batch.core.step.skip;ver - sion="2.0.0.CI-SNAPSHOT";uses:="org.springframework.batch.core,org.sp - ringframework.core",org.springframework.batch.core.step.tasklet;versi - on="2.0.0.CI-SNAPSHOT";uses:="org.apache.commons.logging,org.springfr - amework.batch.core,org.springframework.batch.core.listener,org.spring - framework.batch.core.repository,org.springframework.batch.core.scope. - context,org.springframework.batch.core.step,org.springframework.batch - .item,org.springframework.batch.item.adapter,org.springframework.batc - h.item.support,org.springframework.batch.repeat,org.springframework.b - eans.factory,org.springframework.core.task,org.springframework.transa - ction,org.springframework.transaction.interceptor" -Bundle-Version: 2.0.0.CI-SNAPSHOT - diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/PartitionStepParserTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/PartitionStepParserTests.java index 53203d288..2fe684da8 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/PartitionStepParserTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/PartitionStepParserTests.java @@ -72,8 +72,8 @@ public class PartitionStepParserTests { job1.execute(jobExecution); assertEquals(BatchStatus.COMPLETED, jobExecution.getStatus()); List stepNames = getStepNames(jobExecution); - assertEquals(7, stepNames.size()); - assertEquals("[s1, step1:partition0, step1:partition1, step1:partition2, step1:partition3, step1:partition4, step1:partition5]", stepNames.toString()); + assertEquals(3, stepNames.size()); + assertEquals("[s1, step1:partition0, step1:partition1]", stepNames.toString()); } @Test @@ -83,8 +83,8 @@ public class PartitionStepParserTests { job2.execute(jobExecution); assertEquals(BatchStatus.COMPLETED, jobExecution.getStatus()); List stepNames = getStepNames(jobExecution); - assertEquals(3, stepNames.size()); - assertEquals("[s2, s3, step1:partition0]", stepNames.toString()); + assertEquals(5, stepNames.size()); + assertEquals("[s2, s3, step1:partition0, step1:partition1, step1:partition2]", stepNames.toString()); } private List getStepNames(JobExecution jobExecution) { diff --git a/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/PartitionStepParserTests-context.xml b/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/PartitionStepParserTests-context.xml index 8433a4b21..de8eb241f 100644 --- a/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/PartitionStepParserTests-context.xml +++ b/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/PartitionStepParserTests-context.xml @@ -25,6 +25,7 @@ class="org.springframework.batch.core.partition.support.TaskExecutorPartitionHandler" xmlns="http://www.springframework.org/schema/beans"> +