- try {
- html = new String(data.get(index), "UTF-8");
- } catch (UnsupportedEncodingException e) {
- throw new RuntimeException("Dictionary HTML data corrupted", e);
- }
- htmlRef = new SoftReference<String>(html);
+ html = new String(data.get(index), StandardCharsets.UTF_8);
+ htmlRef = new SoftReference<>(html);