ErrorProne: fix sampler/DefaultCharset
This commit is contained in:
parent
c8ceca0755
commit
6920f98ca4
@ -3,10 +3,11 @@ package atlantafx.sampler.theme;
|
||||
|
||||
import javafx.scene.layout.Region;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Base64;
|
||||
import java.util.Objects;
|
||||
|
||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||
|
||||
public final class CSSFragment {
|
||||
|
||||
private static final String DATA_URI_PREFIX = "data:base64,";
|
||||
@ -51,6 +52,6 @@ public final class CSSFragment {
|
||||
}
|
||||
|
||||
public String toDataURI() {
|
||||
return DATA_URI_PREFIX + new String(Base64.getEncoder().encode(css.getBytes()), StandardCharsets.UTF_8);
|
||||
return DATA_URI_PREFIX + new String(Base64.getEncoder().encode(css.getBytes(UTF_8)), UTF_8);
|
||||
}
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ public final class SamplerTheme implements Theme {
|
||||
// classpath resources are static, no need to parse project theme more than once
|
||||
if (colors != null) { return colors; }
|
||||
|
||||
try (var br = new BufferedReader(new InputStreamReader(file.getInputStream()))) {
|
||||
try (var br = new BufferedReader(new InputStreamReader(file.getInputStream(), UTF_8))) {
|
||||
colors = parseColors(br);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user