I’m using a FileWriter in order to write some analysis information of my application in a text file. The rule S1943 raises an issue even if the FileWriter is created with a CharSet - value like this:
BufferedWriter bw = new BufferedWriter(new FileWriter(resourcedFile, StandardCharsets.UTF_8));
Results in the following Sonar Issue:
I assume, that this rule doesn’t take into account the new FileWriter and FileReader constructors with the charset argument.
We are using SonarQube Version 18.104.22.16843 with SonarJava 5.11 (build 17289).