Why not using os.writeln(line) instead of adding '\n'?
that was the original code. The bug was : oozie wrote all key=value in the same line. Although the application is writing into different lines.
'line' doesn't contain "\n". that's why it is writing into the same line. The property loader reads each line as one key=value. In this case, multiple key=value should in different line.
Therefore, we need to write as the user application is writing.
My bad, but instead adding '\n' the BufferedWriter.newLine() method could be used and that will use the line separator of the platform.
yes. I got the same feedback(use newLine) from Virag. that is better choice.
I will do that.