It seems to me that the contract of the get() method on the
Request object is not defined very well.
The javadoc says:
/**
* Returns the value of the named attribute as an <code>Object</code>,
* or <code>null</code> if no attribute of the given name exists.
*/
So, from this I would conclude that it's the same as getAttribute(name),
so it's superfluous.
In fact, the CLI Request object does implement it in this way.
But :) the http request implementation, does the following:
if (req instanceof MultipartHttpServletRequest) {
return ((MultipartHttpServletRequest) req).get(name);
} else {
// This is a shortened version of the exact code:
return req.getParameterValues(name);
}
So, this implementation is not about attributes at all! Looking through
our code, it seems get() is used whenever it comes to handle an uploaded
file.
I think we should correct the javadocs and the implementation
for the CLI.
WDYT?
Carsten
Carsten Ziegeler
Open Source Group, S&N AG
http://www.s-und-n.de
http://www.osoco.net/weblogs/rael/