3131import java .util .Set ;
3232
3333import org .apache .commons .lang3 .ArrayUtils ;
34- import org .apache .commons .lang3 .StringUtils ;
3534import org .htmlunit .SgmlPage ;
3635import org .htmlunit .corejs .javascript .Function ;
3736import org .htmlunit .corejs .javascript .ScriptableObject ;
110109import org .htmlunit .javascript .host .event .Event ;
111110import org .htmlunit .javascript .host .event .EventHandler ;
112111import org .htmlunit .javascript .host .event .MouseEvent ;
112+ import org .htmlunit .util .StringUtils ;
113113
114114/**
115115 * The JavaScript object {@code HTMLElement} which is the base class for all HTML
@@ -322,14 +322,12 @@ public String getLocalName() {
322322 final String prefix = domNode .getPrefix ();
323323 if (prefix != null ) {
324324 // create string builder only if needed (performance)
325- final StringBuilder localName = new StringBuilder (
326- org .htmlunit .util .StringUtils .toRootLowerCase (prefix ))
325+ final StringBuilder localName = new StringBuilder (StringUtils .toRootLowerCase (prefix ))
327326 .append (':' )
328- .append (org .htmlunit .util .StringUtils
329- .toRootLowerCase (domNode .getLocalName ()));
327+ .append (StringUtils .toRootLowerCase (domNode .getLocalName ()));
330328 return localName .toString ();
331329 }
332- return org . htmlunit . util . StringUtils .toRootLowerCase (domNode .getLocalName ());
330+ return StringUtils .toRootLowerCase (domNode .getLocalName ());
333331 }
334332 return domNode .getLocalName ();
335333 }
@@ -407,7 +405,7 @@ public void setInnerText(final Object value) {
407405 final SgmlPage page = domNode .getPage ();
408406 domNode .removeAllChildren ();
409407
410- if (StringUtils .isNotEmpty (valueString )) {
408+ if (! StringUtils .isEmptyOrNull (valueString )) {
411409 final String [] parts = valueString .split ("\\ r?\\ n" );
412410 for (int i = 0 ; i < parts .length ; i ++) {
413411 if (i != 0 ) {
@@ -446,7 +444,7 @@ public void setOuterText(final Object value) {
446444 final DomNode domNode = getDomNodeOrDie ();
447445 final SgmlPage page = domNode .getPage ();
448446
449- if (org . htmlunit . util . StringUtils .isEmptyOrNull (valueString )) {
447+ if (! StringUtils .isEmptyOrNull (valueString )) {
450448 domNode .getParentNode ().insertBefore (new DomText (page , "" ), domNode );
451449 }
452450 else {
@@ -473,7 +471,7 @@ public void setTextContent(final Object value) {
473471
474472 if (value != null ) {
475473 final String textValue = JavaScriptEngine .toString (value );
476- if (StringUtils .isNotEmpty (textValue )) {
474+ if (! StringUtils .isEmptyOrNull (textValue )) {
477475 domNode .appendChild (new DomText (domNode .getPage (), textValue ));
478476 }
479477 }
0 commit comments