Skip to content

Commit

Permalink
fix charset config and add check at init
Browse files Browse the repository at this point in the history
  • Loading branch information
FrostyHec committed Oct 17, 2024
1 parent 3d67faa commit f2e7ed7
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ public static void main(String[] args) {
}

public static void initEnv() {
Ex.check(Charset.defaultCharset().equals(StandardCharsets.UTF_8),"Charset must be UTF-8");
System.setProperty("file.encoding", "UTF-8");
Ex.check(Charset.defaultCharset().equals(StandardCharsets.UTF_8),"Charset must be UTF-8, current:"+Charset.defaultCharset());
String hubbleHomePath = System.getProperty("hubble.home.path");
Ex.check(StringUtils.isNotEmpty(hubbleHomePath),
"The system property 'hubble.home.path' must be set");
Expand Down

0 comments on commit f2e7ed7

Please sign in to comment.