2626import java .util .List ;
2727import java .util .Locale ;
2828
29- import org .apache .commons .lang3 .StringUtils ;
3029import org .htmlunit .BrowserVersion ;
3130import org .htmlunit .HttpHeader ;
3231import org .htmlunit .SgmlPage ;
4140import org .htmlunit .javascript .configuration .JsxGetter ;
4241import org .htmlunit .javascript .configuration .JsxSetter ;
4342import org .htmlunit .javascript .host .dom .DOMTokenList ;
43+ import org .htmlunit .util .StringUtils ;
4444import org .htmlunit .util .UrlUtils ;
4545
4646/**
@@ -212,7 +212,7 @@ public void setRev(final String rel) {
212212 @ JsxGetter
213213 public String getReferrerPolicy () {
214214 String attrib = getDomNodeOrDie ().getAttribute ("referrerPolicy" );
215- if (org . htmlunit . util . StringUtils .isEmptyOrNull (attrib )) {
215+ if (StringUtils .isEmptyOrNull (attrib )) {
216216 return "" ;
217217 }
218218 attrib = attrib .toLowerCase (Locale .ROOT );
@@ -262,8 +262,8 @@ public String getSearch() {
262262 public void setSearch (final String search ) throws Exception {
263263 final String query ;
264264 if (search == null
265- || org . htmlunit . util . StringUtils .isEmptyString (search )
266- || org . htmlunit . util . StringUtils .equalsChar ('?' , search )) {
265+ || StringUtils .isEmptyString (search )
266+ || StringUtils .equalsChar ('?' , search )) {
267267 query = null ;
268268 }
269269 else if (search .charAt (0 ) == '?' ) {
@@ -375,11 +375,11 @@ public String getHostname() {
375375 @ JsxSetter
376376 public void setHostname (final String hostname ) throws Exception {
377377 if (getBrowserVersion ().hasFeature (JS_ANCHOR_HOSTNAME_IGNORE_BLANK )) {
378- if (!org . htmlunit . util . StringUtils .isBlank (hostname )) {
378+ if (!StringUtils .isBlank (hostname )) {
379379 setUrl (UrlUtils .getUrlWithNewHost (getUrl (), hostname ));
380380 }
381381 }
382- else if (!org . htmlunit . util . StringUtils .isEmptyOrNull (hostname )) {
382+ else if (!StringUtils .isEmptyOrNull (hostname )) {
383383 setUrl (UrlUtils .getUrlWithNewHost (getUrl (), hostname ));
384384 }
385385 }
@@ -398,7 +398,7 @@ public String getPathname() {
398398 String href = anchor .getHrefAttribute ();
399399 if (href .length () > 1 && Character .isLetter (href .charAt (0 )) && ':' == href .charAt (1 )) {
400400 if (browser .hasFeature (JS_ANCHOR_PROTOCOL_COLON_UPPER_CASE_DRIVE_LETTERS )) {
401- href = StringUtils .capitalize (href );
401+ href = org . apache . commons . lang3 . StringUtils .capitalize (href );
402402 }
403403 if (browser .hasFeature (JS_ANCHOR_PATHNAME_PREFIX_WIN_DRIVES_URL )) {
404404 href = "/" + href ;
@@ -482,7 +482,7 @@ public String getProtocol() {
482482 if (anchor .getHrefAttribute ().startsWith ("http" )) {
483483 return ":" ;
484484 }
485- return org . htmlunit . util . StringUtils .substringBefore (anchor .getHrefAttribute (), "/" );
485+ return StringUtils .substringBefore (anchor .getHrefAttribute (), "/" );
486486 }
487487 }
488488
@@ -498,7 +498,7 @@ public void setProtocol(final String protocol) throws Exception {
498498 return ;
499499 }
500500
501- final String bareProtocol = org . htmlunit . util . StringUtils .substringBefore (protocol , ":" ).trim ();
501+ final String bareProtocol = StringUtils .substringBefore (protocol , ":" ).trim ();
502502 if (!UrlUtils .isValidScheme (bareProtocol )) {
503503 return ;
504504 }
@@ -656,7 +656,7 @@ public String getUsername() {
656656 if (userInfo == null ) {
657657 return "" ;
658658 }
659- return StringUtils .substringBefore (userInfo , ':' );
659+ return org . apache . commons . lang3 . StringUtils .substringBefore (userInfo , ':' );
660660 }
661661 catch (final MalformedURLException e ) {
662662 return "" ;
0 commit comments