Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WW-5387] Fixes remove() signature #844

Merged
merged 1 commit into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,16 @@ public Object put(final String key, final Object value) {
* @param key the attribute to remove.
* @return the entry that was just removed.
*/
public Object remove(final String key) {
@Override
public Object remove(Object key) {
if (key == null) {
return null;
}

entries = null;

Object value = get(key);
context.removeAttribute(key);
context.removeAttribute(key.toString());

return value;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,16 @@ public Object put(final String key, final Object value) {
* @param key the name of the attribute to remove.
* @return the value that was removed or <tt>null</tt> if the value was not found (and hence, not removed).
*/
public Object remove(final String key) {
@Override
public Object remove(final Object key) {
if (key == null) {
return null;
}

entries = null;

Object value = get(key);
request.removeAttribute(key);
request.removeAttribute(key.toString());

return value;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,16 @@ public Object put(String key, Object value) {
* the attribute to remove.
* @return the entry that was just removed.
*/
public Object remove(String key) {
@Override
public Object remove(Object key) {
if (key == null) {
return null;
}

entries = null;

Object value = get(key);
context.removeAttribute(key);
context.removeAttribute(key.toString());

return value;
}
Expand Down
Loading