fixed setRootObject check in StandardEvaluationContext (SPR-8241)
This commit is contained in:
parent
1843bdde35
commit
81e9f6cc2c
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2009 the original author or authors.
|
* Copyright 2002-2011 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.
|
||||||
|
|
@ -80,18 +80,14 @@ public class StandardEvaluationContext implements EvaluationContext {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void setRootObject(Object rootObject) {
|
|
||||||
if (this.rootObject == null) {
|
|
||||||
this.rootObject = TypedValue.NULL;
|
|
||||||
} else {
|
|
||||||
this.rootObject = new TypedValue(rootObject);//, TypeDescriptor.forObject(rootObject));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRootObject(Object rootObject, TypeDescriptor typeDescriptor) {
|
public void setRootObject(Object rootObject, TypeDescriptor typeDescriptor) {
|
||||||
this.rootObject = new TypedValue(rootObject, typeDescriptor);
|
this.rootObject = new TypedValue(rootObject, typeDescriptor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setRootObject(Object rootObject) {
|
||||||
|
this.rootObject = (rootObject != null ? new TypedValue(rootObject) : TypedValue.NULL);
|
||||||
|
}
|
||||||
|
|
||||||
public TypedValue getRootObject() {
|
public TypedValue getRootObject() {
|
||||||
return this.rootObject;
|
return this.rootObject;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue