summaryrefslogtreecommitdiff
path: root/src/main/java/com/amazon/carbonado/layout
diff options
context:
space:
mode:
authorBrian S. O'Neill <bronee@gmail.com>2007-01-30 03:19:58 +0000
committerBrian S. O'Neill <bronee@gmail.com>2007-01-30 03:19:58 +0000
commitf1d68efbd516ea37ed12a0d2da430b59b8e418f9 (patch)
tree01bfd180cc3f1366e0abb5c31702d902450cb5e1 /src/main/java/com/amazon/carbonado/layout
parent48d34d65928010cf022913bf0126629604a6398d (diff)
More cursor closing paranoia.
Diffstat (limited to 'src/main/java/com/amazon/carbonado/layout')
-rw-r--r--src/main/java/com/amazon/carbonado/layout/Layout.java14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/main/java/com/amazon/carbonado/layout/Layout.java b/src/main/java/com/amazon/carbonado/layout/Layout.java
index 62e29f2..1c6b63d 100644
--- a/src/main/java/com/amazon/carbonado/layout/Layout.java
+++ b/src/main/java/com/amazon/carbonado/layout/Layout.java
@@ -231,13 +231,17 @@ public class Layout {
.orderBy("ordinal")
.fetch();
- List<LayoutProperty> list = new ArrayList<LayoutProperty>();
+ try {
+ List<LayoutProperty> list = new ArrayList<LayoutProperty>();
- while (cursor.hasNext()) {
- list.add(new LayoutProperty(cursor.next()));
- }
+ while (cursor.hasNext()) {
+ list.add(new LayoutProperty(cursor.next()));
+ }
- mAllProperties = Collections.unmodifiableList(list);
+ mAllProperties = Collections.unmodifiableList(list);
+ } finally {
+ cursor.close();
+ }
}
return mAllProperties;