Skip to content
Permalink
Browse files
Use try-with-resources.
  • Loading branch information
garydgregory committed May 15, 2022
1 parent 5d1197c commit 6dc37c46e5645380841abad9c061f5c45529f2eb
Showing 1 changed file with 1 addition and 3 deletions.
@@ -135,13 +135,11 @@ public void run() {
* @throws ConfigurationException if an error occurs
*/
private static void load(final INIConfiguration instance, final String data) throws ConfigurationException {
final StringReader reader = new StringReader(data);
try {
try (final StringReader reader = new StringReader(data)) {
instance.read(reader);
} catch (final IOException e) {
throw new ConfigurationException(e);
}
reader.close();
}

/**

0 comments on commit 6dc37c4

Please sign in to comment.