Skip to content

Commit 97938e3

Browse files
committed
checkstyle
1 parent 9a40459 commit 97938e3

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

src/main/java/org/htmlunit/protocol/data/DataUrlDecoder.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import java.nio.charset.UnsupportedCharsetException;
2525

2626
import org.apache.commons.codec.binary.Base64;
27+
import org.apache.commons.lang3.StringUtils;
2728
import org.htmlunit.util.MimeType;
2829
import org.htmlunit.util.UrlUtils;
2930

src/main/java/org/htmlunit/util/UrlUtils.java

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1404,7 +1404,7 @@ public static byte[] decodeDataUrl(final byte[] bytes) throws IllegalArgumentExc
14041404
return buffer.toByteArray();
14051405
}
14061406

1407-
public static final byte[] decodeUrl(final byte[] bytes) throws IllegalArgumentException {
1407+
public static byte[] decodeUrl(final byte[] bytes) throws IllegalArgumentException {
14081408
if (bytes == null) {
14091409
return null;
14101410
}
@@ -1413,15 +1413,18 @@ public static final byte[] decodeUrl(final byte[] bytes) throws IllegalArgumentE
14131413
final int b = bytes[i];
14141414
if (b == '+') {
14151415
buffer.write(' ');
1416-
} else if (b == '%') {
1416+
}
1417+
else if (b == '%') {
14171418
try {
14181419
final int u = digit16(bytes[++i]);
14191420
final int l = digit16(bytes[++i]);
14201421
buffer.write((char) ((u << 4) + l));
1421-
} catch (final ArrayIndexOutOfBoundsException e) {
1422+
}
1423+
catch (final ArrayIndexOutOfBoundsException e) {
14221424
throw new IllegalArgumentException("Invalid URL encoding: ", e);
14231425
}
1424-
} else {
1426+
}
1427+
else {
14251428
buffer.write(b);
14261429
}
14271430
}
@@ -1437,7 +1440,7 @@ private static int digit16(final byte b) throws IllegalArgumentException {
14371440
}
14381441

14391442
// adapted from apache commons codec
1440-
public static final byte[] encodeUrl(BitSet urlsafe, final byte[] bytes) {
1443+
public static byte[] encodeUrl(final BitSet urlsafe, final byte[] bytes) {
14411444
if (bytes == null) {
14421445
return null;
14431446
}
@@ -1453,7 +1456,8 @@ public static final byte[] encodeUrl(BitSet urlsafe, final byte[] bytes) {
14531456
b = '+';
14541457
}
14551458
buffer.write(b);
1456-
} else {
1459+
}
1460+
else {
14571461
buffer.write('%');
14581462
final char hex1 = hexDigit(b >> 4);
14591463
final char hex2 = hexDigit(b);

0 commit comments

Comments
 (0)