forked from loafle/openapi-generator-original
second part of fixing Sonar issues (#2295)
* fix sonar issues * fix csharp model issue * refactor code
This commit is contained in:
committed by
William Cheng
parent
546a230c73
commit
3100afce26
@@ -86,10 +86,9 @@ public class ConfigHelp implements Runnable {
|
||||
//noinspection ResultOfMethodCallIgnored
|
||||
out.getParentFile().mkdirs();
|
||||
|
||||
Writer writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(out), StandardCharsets.UTF_8));
|
||||
|
||||
writer.write(sb.toString());
|
||||
writer.close();
|
||||
try (Writer writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(out), StandardCharsets.UTF_8))) {
|
||||
writer.write(sb.toString());
|
||||
}
|
||||
} else {
|
||||
System.out.print(sb.toString());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user