Skip to content

Commit 49a5eff

Browse files
committed
Add a private constructor to hide the implicit public one.
1 parent 5c43e36 commit 49a5eff

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

webmagic-core/src/main/java/us/codecraft/webmagic/utils/CharsetUtils.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ public abstract class CharsetUtils {
2121

2222
private static Logger logger = LoggerFactory.getLogger(CharsetUtils.class);
2323

24+
private CharsetUtils() {
25+
throw new AssertionError("No us.codecraft.webmagic.utils.CharsetUtils instances for you!");
26+
}
27+
2428
public static String detectCharset(String contentType, byte[] contentBytes) throws IOException {
2529
String charset;
2630
// charset

0 commit comments

Comments
 (0)