Skip to content

Commit

Permalink
Update metafacture-xml/src/main/java/org/metafacture/xml/SimpleXmlEnc…
Browse files Browse the repository at this point in the history
…oder.java

Co-authored-by: Jens Wille <jens.wille@hbz-nrw.de>
  • Loading branch information
dr0i and blackwinter authored Mar 19, 2024
1 parent dc1f6c8 commit cb6d768
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,18 +224,12 @@ public void setNamespaces(final Map<String, String> namespaces) {
*/
public void setNamespaces(final String namespacesString) {
final Properties properties = new Properties();
final StringReader sr = new StringReader(namespacesString);
try {
try (StringReader sr = new StringReader(namespacesString)) {
properties.load(sr);
}
catch (final IOException e) {
throw new MetafactureException("Failed to create namespace list");
}
finally {
if (sr != null) {
sr.close();
}
}
propertiesToMap(properties);
}

Expand Down

0 comments on commit cb6d768

Please sign in to comment.