Skip to content

Commit db185be

Browse files
committed
simplify
1 parent f9af348 commit db185be

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/main/java/org/htmlunit/javascript/host/html/HTMLSpanElement.java

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
import static org.htmlunit.BrowserVersionFeatures.HTMLBASEFONT_END_TAG_FORBIDDEN;
1818

19-
import org.htmlunit.BrowserVersion;
2019
import org.htmlunit.html.DomNode;
2120
import org.htmlunit.html.HtmlSpan;
2221
import org.htmlunit.javascript.configuration.JsxClass;
@@ -51,15 +50,8 @@ public void jsConstructor() {
5150
@Override
5251
public void setDomNode(final DomNode domNode) {
5352
super.setDomNode(domNode);
54-
final BrowserVersion browser = getBrowserVersion();
55-
if (browser.hasFeature(HTMLBASEFONT_END_TAG_FORBIDDEN)) {
56-
switch (StringUtils.toRootLowerCase(domNode.getLocalName())) {
57-
case "basefont":
58-
endTagForbidden_ = true;
59-
break;
60-
default:
61-
}
62-
}
53+
endTagForbidden_ = getBrowserVersion().hasFeature(HTMLBASEFONT_END_TAG_FORBIDDEN)
54+
&& "basefont".equals(StringUtils.toRootLowerCase(domNode.getLocalName()));
6355
}
6456

6557
/**

0 commit comments

Comments
 (0)