Skip to content

Commit db0800d

Browse files
committed
document HtmlButton's no-op implementations for reset and default value handling, and remove extraneous debug logging
1 parent 5722fb3 commit db0800d

2 files changed

Lines changed: 12 additions & 6 deletions

File tree

src/changes/changes.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88

99
<body>
1010
<release version="5.4.0" date="August xx, 2026" description="Firefox 153, Bugfixes">
11+
<action type="remove" dev="rbri">
12+
Document HtmlButton's no-op implementations for reset and default value handling, and remove extraneous debug logging.
13+
</action>
1114
<action type="remove" dev="rbri">
1215
Method isReadonly() removed from HtmlButton; because there is no readonly support for this control.
1316
</action>

src/main/java/org/htmlunit/html/HtmlButton.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
import java.io.IOException;
2020
import java.util.Map;
2121

22-
import org.apache.commons.logging.Log;
23-
import org.apache.commons.logging.LogFactory;
2422
import org.htmlunit.SgmlPage;
2523
import org.htmlunit.javascript.host.event.Event;
2624
import org.htmlunit.javascript.host.event.MouseEvent;
@@ -45,7 +43,7 @@
4543
public class HtmlButton extends HtmlElement implements DisabledElement, SubmittableElement,
4644
LabelableElement, ValidatableElement {
4745

48-
private static final Log LOG = LogFactory.getLog(HtmlButton.class);
46+
// private static final Log LOG = LogFactory.getLog(HtmlButton.class);
4947

5048
/** The HTML tag represented by this element. */
5149
public static final String TAG_NAME = "button";
@@ -115,31 +113,36 @@ public NameValuePair[] getSubmitNameValuePairs() {
115113
/**
116114
* {@inheritDoc}
117115
*
116+
* This implementation is empty; buttons have no reset-specific behavior.
117+
*
118118
* @see SubmittableElement#reset()
119119
*/
120120
@Override
121121
public void reset() {
122-
LOG.debug("reset() not implemented for this element");
122+
// Empty.
123123
}
124124

125125
/**
126126
* {@inheritDoc}
127127
*
128+
* This implementation is empty; buttons do not maintain a default value.
129+
*
128130
* @see SubmittableElement#setDefaultValue(String)
129131
*/
130132
@Override
131133
public void setDefaultValue(final String defaultValue) {
132-
LOG.debug("setDefaultValue() not implemented for this element");
134+
// Empty.
133135
}
134136

135137
/**
136138
* {@inheritDoc}
137139
*
140+
* This implementation returns an empty string; buttons do not maintain a default value.
141+
*
138142
* @see SubmittableElement#getDefaultValue()
139143
*/
140144
@Override
141145
public String getDefaultValue() {
142-
LOG.debug("getDefaultValue() not implemented for this element");
143146
return "";
144147
}
145148

0 commit comments

Comments
 (0)