Redundant code in InputCheckBoxTag

Description

In the following method, no matter whether the "checked" attribute gets set or not, it gets removed afterwards:

InputCheckBoxTag

1 2 3 4 5 6 7 8 9 10 11 12 public int doEndInputTag() throws JspException { Object checked = this.getOverrideValueOrValues(); this.getAttributes().put("value", this.format(this.value)); if(this.isItemSelected(this.value, checked)) { this.getAttributes().put("checked", "checked"); } this.writeSingletonTag(this.getPageContext().getOut(), "input"); this.getAttributes().remove("checked"); this.getAttributes().remove("value"); return 6; }

Environment

None

Status

Assignee

Unassigned

Reporter

Shlomo Konwisser (Georg)

Labels

None

Tester

None

Components

Priority

Minor
Configure