diff options
author | snowleo <snowleo@e251c2fe-e539-e718-e476-b85c1f46cddb> | 2011-03-21 12:51:26 +0000 |
---|---|---|
committer | snowleo <snowleo@e251c2fe-e539-e718-e476-b85c1f46cddb> | 2011-03-21 12:51:26 +0000 |
commit | a3405bb7141dd3c784ab59fbb82b32493286cf86 (patch) | |
tree | 3123dec8335482a458a6989587822f8200d2295e | |
parent | d9117d74b3dc5624c758101cc9733bb47aa2f346 (diff) | |
download | Essentials-a3405bb7141dd3c784ab59fbb82b32493286cf86.tar Essentials-a3405bb7141dd3c784ab59fbb82b32493286cf86.tar.gz Essentials-a3405bb7141dd3c784ab59fbb82b32493286cf86.tar.lz Essentials-a3405bb7141dd3c784ab59fbb82b32493286cf86.tar.xz Essentials-a3405bb7141dd3c784ab59fbb82b32493286cf86.zip |
[trunk] Fix NPE in EssentialsConf on closing the stream.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@989 e251c2fe-e539-e718-e476-b85c1f46cddb
-rw-r--r-- | Essentials/src/com/earth2me/essentials/EssentialsConf.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Essentials/src/com/earth2me/essentials/EssentialsConf.java b/Essentials/src/com/earth2me/essentials/EssentialsConf.java index 616f39a6c..124dc6fd2 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsConf.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsConf.java @@ -81,7 +81,6 @@ public class EssentialsConf extends Configuration ostr.write(buffer, 0, length); length = istr.read(buffer); } - ostr.close(); istr.close(); } catch (IOException ex) @@ -93,7 +92,9 @@ public class EssentialsConf extends Configuration { try { - ostr.close(); + if (ostr != null) { + ostr.close(); + } } catch (IOException ex) { |