Description
Consider the clearCookie method.
The WicketTesterServletWebResponse clearCookie calls the
super class (ServletWebResponse) clearCookie method which
(amoung other things) calls the addCookie method.
Because of polymorphism, this calls the WicketTesterServletWebResponse
addCookie which adds the cookie to the cookies List.
Then the WicketTesterServletWebResponse clearCookie
method adds the cookie a second time to the cookies List.
Unless it is useful to have the same cookie in the List
more than once, the List could be a Set.
private static class WicketTesterServletWebResponse
extends ServletWebResponse
mplements IMetaDataBufferingWebResponse {
...
@Override
public void addCookie(Cookie cookie)
@Override
public void clearCookie(Cookie cookie)
...
}
public class ServletWebResponse extends WebResponse {
...
@Override
public void addCookie(Cookie cookie)
@Override
public void clearCookie(Cookie cookie)
...
}