From 0947834ac950fb4dd59b719cbdddc1726e68674b Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Thu, 11 Jan 2007 23:19:44 +0000 Subject: Fixes for bugs found using FindBugs. --- src/main/java/com/amazon/carbonado/adapter/TextAdapter.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/main/java/com/amazon/carbonado/adapter') diff --git a/src/main/java/com/amazon/carbonado/adapter/TextAdapter.java b/src/main/java/com/amazon/carbonado/adapter/TextAdapter.java index 8a51c3f..8a7542d 100644 --- a/src/main/java/com/amazon/carbonado/adapter/TextAdapter.java +++ b/src/main/java/com/amazon/carbonado/adapter/TextAdapter.java @@ -233,8 +233,11 @@ public @interface TextAdapter { Writer w = new OutputStreamWriter(blob.openOutputStream(), encoder); try { - w.write(text, 0, text.length()); - w.close(); + try { + w.write(text, 0, text.length()); + } finally { + w.close(); + } } catch (IOException e) { throw toPersistException(e); } -- cgit v1.2.3