move into try with resource catch

This commit is contained in:
marhali 2022-07-01 15:15:32 +02:00
parent 09fedd03dc
commit 87b6ee3170

View File

@ -58,7 +58,7 @@ public class SortableProperties extends Properties {
} }
public void store(Writer writer) throws IOException { public void store(Writer writer) throws IOException {
IntelliJBufferedWriter bw = new IntelliJBufferedWriter(writer); try(IntelliJBufferedWriter bw = new IntelliJBufferedWriter(writer)) {
boolean escUnicode = false; boolean escUnicode = false;
synchronized (this) { synchronized (this) {
@ -76,6 +76,7 @@ public class SortableProperties extends Properties {
} }
bw.flush(); bw.flush();
} }
}
/* /*
* Converts unicodes to encoded \uxxxx and escapes * Converts unicodes to encoded \uxxxx and escapes