Skip to content

Commit a5977f7

Browse files
committed
code cleanup
1 parent 4f70940 commit a5977f7

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1427,11 +1427,12 @@ private void executeRefreshIfNeeded() throws IOException {
14271427
final char separator = urlPart.charAt(0);
14281428
if (";, \r\n\t".indexOf(separator) >= 0) {
14291429
urlPart = StringUtils.stripStart(urlPart, ";, \r\n\t");
1430-
if (urlPart.toLowerCase(Locale.ROOT).startsWith("url")) {
1430+
urlPart = urlPart.toLowerCase(Locale.ROOT);
1431+
if (urlPart.startsWith("url")) {
14311432
urlPart = urlPart.substring(3);
14321433
urlPart = urlPart.trim();
14331434

1434-
if (urlPart.toLowerCase().startsWith("=")) {
1435+
if (urlPart.length() > 0 && urlPart.charAt(0) == '=') {
14351436
urlPart = urlPart.substring(1);
14361437
urlPart = urlPart.trim();
14371438
}

0 commit comments

Comments
 (0)