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

Removing unnecessary statement #309

Merged
merged 1 commit into from
Jan 13, 2014
Merged

Conversation

garcia-jj
Copy link
Member

Because HttpSession.removeAttribute always check if attribute is not null before remove.

}
String param = nameFor(method);
Object[] args = (Object[]) session.getAttribute(param);
session.removeAttribute(param);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The session.removeAttribute(param) just ignore when param is null? If so, 👍

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By Javadocs: Removes the object bound with the specified name from this session. If the session does not have an object bound with the specified name, this method does nothing.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so, 🚢

garcia-jj added a commit that referenced this pull request Jan 13, 2014
@garcia-jj garcia-jj merged commit dd5183f into master Jan 13, 2014
@garcia-jj garcia-jj deleted the ot-unnecessary-sessionstatement branch January 13, 2014 15:16
@Turini Turini added this to the 4.0.0-RC1 milestone Mar 6, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants