Skip to content

Possible Memory Leak in DynamicDataXmlFileIO #3

Description

@Janekdererste

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(); }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions