Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XML configuration files might not be saving properly #361

Open
Enet4 opened this issue Jun 4, 2018 · 0 comments
Open

XML configuration files might not be saving properly #361

Enet4 opened this issue Jun 4, 2018 · 0 comments

Comments

@Enet4
Copy link
Collaborator

Enet4 commented Jun 4, 2018

This is a bit tricky to reproduce, but sometimes some configuration files are not fully written to disk. For example, roles.xml might end up like this:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Roles>

... rather than this:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Roles>
  <Role name="admin"></Role>
  <Role name="healthcare"></Role>
</Roles>

Saving the settings back to disk is done on boot (so as to ensure that at least the default configuration files exist) and when certain configurations are updated. My hunch is that the XML parser implementations are not closing the output streams. These lines, for instance, look problematic, because it's not closing from the end adaptor pw and is swallowing potential I/O exceptions without even logging them. In RolesXML, the implementations of printFile and printXML also seem a bit dubious.

@Enet4 Enet4 changed the title XML configuration files might not be saved properly XML configuration files might not be saving properly Jun 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant