Browse Source

fixed setRootObject check in StandardEvaluationContext (SPR-8241)

pull/7/head
Juergen Hoeller 13 years ago
parent
commit
81e9f6cc2c
  1. 14
      org.springframework.expression/src/main/java/org/springframework/expression/spel/support/StandardEvaluationContext.java

14
org.springframework.expression/src/main/java/org/springframework/expression/spel/support/StandardEvaluationContext.java

@ -1,5 +1,5 @@ @@ -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");
* you may not use this file except in compliance with the License.
@ -80,18 +80,14 @@ public class StandardEvaluationContext implements EvaluationContext { @@ -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) {
this.rootObject = new TypedValue(rootObject, typeDescriptor);
}
public void setRootObject(Object rootObject) {
this.rootObject = (rootObject != null ? new TypedValue(rootObject) : TypedValue.NULL);
}
public TypedValue getRootObject() {
return this.rootObject;
}

Loading…
Cancel
Save