Make sure the contentType of detectCharset could be null.

pull/1169/head
Joe Zhou 8 months ago
parent d2aebc60a7
commit 5c43e36118

@ -0,0 +1,16 @@
package us.codecraft.webmagic.utils;
import static org.junit.jupiter.api.Assertions.assertNull;
import java.io.IOException;
import org.junit.jupiter.api.Test;
class CharsetUtilsTest {
@Test
void testDetectCharset() throws IOException {
assertNull(CharsetUtils.detectCharset(null, new byte[0]));
}
}
Loading…
Cancel
Save