Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.6-beta-2
-
None
Description
If you look at the current implementation of ServletBinding in trunk, method getVariables() is not an accurate depiction of what variables getVariable will to respond to.
public Map getVariables() {
return binding.getVariables();
}
This returns the list of variables that were specifically created through setVariable. But if you look at the implementation of getVariable it inspects the name of the property that is being requested and will handle an additional three variables out, sout and html. Giving the fact that getVariables is the only way to inspect if a binding is aware of a specific variable without dealing with exception handling (getVariable throws an exeception if it cant find said variable) this seems like a bug.
The two possible solutions being:
1.) Provide a method to determine the existence of a variable without having to catch exceptions
or
2.) Register out, sout and html via setVariable and not property name inspection in getVariable