Skip to content

Commit cedf83c

Browse files
committed
Cleanup UTF BOM recognition
1 parent 87085a8 commit cedf83c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/main/java/org/jsoup/helper/HttpConnection.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,8 +490,10 @@ private static String fixHeaderEncoding(String val) {
490490
private static boolean looksLikeUtf8(byte[] input) {
491491
int i = 0;
492492
// BOM:
493-
if (input.length >= 3 && (input[0] & 0xFF) == 0xEF
494-
&& (input[1] & 0xFF) == 0xBB & (input[2] & 0xFF) == 0xBF) {
493+
if (input.length >= 3
494+
&& (input[0] & 0xFF) == 0xEF
495+
&& (input[1] & 0xFF) == 0xBB
496+
&& (input[2] & 0xFF) == 0xBF) {
495497
i = 3;
496498
}
497499

0 commit comments

Comments
 (0)