From 877481bd31c8f581cce607d9e9f6bb3d837a592e Mon Sep 17 00:00:00 2001 From: dsyer Date: Thu, 12 Nov 2009 12:51:02 +0000 Subject: [PATCH] Fix Spring3 integration test (default scope is null in Spring 3) --- .../org/springframework/batch/core/scope/StepScope.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/scope/StepScope.java b/spring-batch-core/src/main/java/org/springframework/batch/core/scope/StepScope.java index 1283eb28e..e3af71c7e 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/scope/StepScope.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/scope/StepScope.java @@ -365,11 +365,12 @@ public class StepScope implements Scope, BeanFactoryPostProcessor, Ordered { definition = holder.getBeanDefinition(); } if (definition != null) { - boolean scopeChange = !scope.equals(definition.getScope()); + String otherScope = definition.getScope(); + boolean scopeChange = !scope.equals(otherScope); if (scopeChange) { - new ExpressionHider(definition.getScope(), !scoped).visitBeanDefinition(definition); + new ExpressionHider(otherScope==null?scope:otherScope, !scoped).visitBeanDefinition(definition); // Exit here so that nested inner bean definitions are not - // analysed by both vistors + // analysed by both visitors return value; } }