Use 'toString(Charset)' instead of 'toString(String)' for encodings (#27646)
Co-authored-by: 홍성민(SungMin Hong)/Platform Engineering팀/11ST <devmonster@11stcorp.com>
This commit is contained in:
@@ -88,7 +88,7 @@ class SortedProperties extends Properties {
|
||||
public void store(OutputStream out, String comments) throws IOException {
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
super.store(baos, (this.omitComments ? null : comments));
|
||||
String contents = baos.toString(StandardCharsets.ISO_8859_1.name());
|
||||
String contents = baos.toString(StandardCharsets.ISO_8859_1);
|
||||
for (String line : contents.split(EOL)) {
|
||||
if (!(this.omitComments && line.startsWith("#"))) {
|
||||
out.write((line + EOL).getBytes(StandardCharsets.ISO_8859_1));
|
||||
|
||||
Reference in New Issue
Block a user