We are using this writer utility in our MATSim project. While browsing your code I found the below line which opens a PrinWriter but doesn't close it in case of an exception
a possible improvement would be to use an autoclose try/catch block
try(PrintWriter writer = new PrintWriter(new File(filename)) { writer.print("<"); .... writer.flush(); }
We are using this writer utility in our MATSim project. While browsing your code I found the below line which opens a PrinWriter but doesn't close it in case of an exception
java/utilities/src/main/java/floetteroed/utilities/DynamicDataXMLFileIO.java
Line 128 in be76e8c
a possible improvement would be to use an autoclose try/catch block
try(PrintWriter writer = new PrintWriter(new File(filename)) { writer.print("<"); .... writer.flush(); }