Bug in SpEL documentation
Hi,
On page:
http://static.springsource.org/sprin...pressions.html
there is a bug.
Any code that resembles the following:
Code:
EvaluationContext context = new StandardEvaluationContext();
context.setRootObject(tesla);
should be the following:
Code:
StandardEvaluationContext context = new StandardEvaluationContext();
context.setRootObject(tesla);
It seems that the following method:
Code:
void org.springframework.expression.spel.support.StandardEvaluationContext.setRootObject(Object rootObject)
is not on the interface but is present in the concrete class.
What was the intended design here by the way? To have it only on the concrete class? If so then how can one benefit from the use of the interface?
Update: Actually after a while I spotted the constructor argument so that the above can simply be:
Code:
EvaluationContext context = new StandardEvaluationContext(tesla);
However, the documentation can still be amended.
Thanks.