BeanLookupBindings: check appCtx != null explicitly, rather than using

assert.
This commit is contained in:
Kenji Nagahashi
2013-05-28 13:20:23 -07:00
parent 73888819dc
commit 7f2aacba2c
@@ -16,16 +16,16 @@ import org.springframework.context.ApplicationContext;
*/
public class BeanLookupBindings extends SimpleBindings {
private ApplicationContext appCtx = null;
private final ApplicationContext appCtx;
public BeanLookupBindings(ApplicationContext appCtx) {
assert appCtx != null;
if (appCtx == null) throw new NullPointerException("appCtx");
this.appCtx = appCtx;
}
public BeanLookupBindings(ApplicationContext appCtx, Map<String, Object> m) {
super(m);
assert appCtx != null;
if (appCtx == null) throw new NullPointerException("appCtx");
this.appCtx = appCtx;
}