mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-05-02 12:03:41 +01:00
polishing
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2792 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
+3
-3
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2002-2009 the original author or authors.
|
* Copyright 2002-2010 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -33,7 +33,7 @@ import org.springframework.expression.TypedValue;
|
|||||||
public class BeanExpressionContextAccessor implements PropertyAccessor {
|
public class BeanExpressionContextAccessor implements PropertyAccessor {
|
||||||
|
|
||||||
public boolean canRead(EvaluationContext context, Object target, String name) throws AccessException {
|
public boolean canRead(EvaluationContext context, Object target, String name) throws AccessException {
|
||||||
return (((BeanExpressionContext) target).containsObject(name));
|
return ((BeanExpressionContext) target).containsObject(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
public TypedValue read(EvaluationContext context, Object target, String name) throws AccessException {
|
public TypedValue read(EvaluationContext context, Object target, String name) throws AccessException {
|
||||||
@@ -52,4 +52,4 @@ public class BeanExpressionContextAccessor implements PropertyAccessor {
|
|||||||
return new Class[] {BeanExpressionContext.class};
|
return new Class[] {BeanExpressionContext.class};
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-5
@@ -274,21 +274,20 @@ public class DefaultLifecycleProcessor implements LifecycleProcessor, BeanFactor
|
|||||||
|
|
||||||
private final long timeout;
|
private final long timeout;
|
||||||
|
|
||||||
|
public LifecycleGroup(int phase, long timeout, Map<String, ? extends Lifecycle> lifecycleBeans) {
|
||||||
LifecycleGroup(int phase, long timeout, Map<String, ? extends Lifecycle> lifecycleBeans) {
|
|
||||||
this.phase = phase;
|
this.phase = phase;
|
||||||
this.timeout = timeout;
|
this.timeout = timeout;
|
||||||
this.lifecycleBeans = lifecycleBeans;
|
this.lifecycleBeans = lifecycleBeans;
|
||||||
}
|
}
|
||||||
|
|
||||||
void add(String name, Lifecycle bean) {
|
public void add(String name, Lifecycle bean) {
|
||||||
if (bean instanceof SmartLifecycle) {
|
if (bean instanceof SmartLifecycle) {
|
||||||
this.smartMemberCount++;
|
this.smartMemberCount++;
|
||||||
}
|
}
|
||||||
this.members.add(new LifecycleGroupMember(name, bean));
|
this.members.add(new LifecycleGroupMember(name, bean));
|
||||||
}
|
}
|
||||||
|
|
||||||
void start() {
|
public void start() {
|
||||||
if (members.size() == 0) {
|
if (members.size() == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -300,7 +299,7 @@ public class DefaultLifecycleProcessor implements LifecycleProcessor, BeanFactor
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void stop() {
|
public void stop() {
|
||||||
if (members.size() == 0) {
|
if (members.size() == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user