From 5027be97bcec0d36843ceb2f5fed2fca50bd8d4d Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Mon, 26 Mar 2012 12:33:36 -0700 Subject: [PATCH] Close guacamole.properties when done. --- .../sourceforge/guacamole/properties/GuacamoleProperties.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/guacamole-common/src/main/java/net/sourceforge/guacamole/properties/GuacamoleProperties.java b/guacamole-common/src/main/java/net/sourceforge/guacamole/properties/GuacamoleProperties.java index 4a9d0c67f..cb626d54a 100644 --- a/guacamole-common/src/main/java/net/sourceforge/guacamole/properties/GuacamoleProperties.java +++ b/guacamole-common/src/main/java/net/sourceforge/guacamole/properties/GuacamoleProperties.java @@ -87,7 +87,9 @@ public class GuacamoleProperties { if (stream == null) throw new IOException("Resource /guacamole.properties not found."); - properties.load(stream); + // Load properties, always close stream + try { properties.load(stream); } + finally { stream.close(); } } catch (IOException e) {