Reuse existing variable in CommentParser code used in Java tests

No real changes, just a tiny simplification.
This commit is contained in:
Vadim Zeitlin 2019-12-18 02:24:01 +01:00
commit fe6968e5e2

View file

@ -93,13 +93,13 @@ public class CommentParser {
System.out.println("Output is also saved to files '" + expectedFileName +
"' and '" + gotFileName + "'");
// here we print original strings, for nicer output
System.out.println("\n\n---\nexpected:\n" + wantedComments.get(e.getKey()));
System.out.println("\n\n---\nexpected:\n" + wantedStr);
System.out.println("\n\n---\ngot:\n" + e.getValue());
try {
// write expected string to file
BufferedWriter expectedFile = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(expectedFileName)));
expectedFile.write(wantedComments.get(e.getKey()));
expectedFile.write(wantedStr);
expectedFile.close();
// write translated string to file