aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/data/util/sqlcontainer
diff options
context:
space:
mode:
authorEdoardo Vacchi <uncommonnonsense@gmail.com>2013-09-13 09:11:04 +0200
committerEdoardo Vacchi <edoardo.vacchi@gmail.com>2013-09-13 08:27:15 +0000
commit3a31dfe01db0607d3b1b7676a7bc6e96178eee6d (patch)
treec64ef77fee49413cb02fad69709e29e4e93cbe7d /server/src/com/vaadin/data/util/sqlcontainer
parente4d99b3631a70a9ca11c085b4de09b4daf400176 (diff)
downloadvaadin-framework-3a31dfe01db0607d3b1b7676a7bc6e96178eee6d.tar.gz
vaadin-framework-3a31dfe01db0607d3b1b7676a7bc6e96178eee6d.zip
NullPointerException in TableQuery.fetchMetadata() (#11403)
Trivial patch. The finally block lacks a check for null before attempting to invoke table.close() Change-Id: Ib32f1d75fef4bd442652ca60a2b7df6aa45d7fa7
Diffstat (limited to 'server/src/com/vaadin/data/util/sqlcontainer')
-rw-r--r--server/src/com/vaadin/data/util/sqlcontainer/query/TableQuery.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/src/com/vaadin/data/util/sqlcontainer/query/TableQuery.java b/server/src/com/vaadin/data/util/sqlcontainer/query/TableQuery.java
index 39c8365076..b54a630e04 100644
--- a/server/src/com/vaadin/data/util/sqlcontainer/query/TableQuery.java
+++ b/server/src/com/vaadin/data/util/sqlcontainer/query/TableQuery.java
@@ -663,7 +663,9 @@ public class TableQuery extends AbstractTransactionalQuery implements
} catch (SQLException ignore) {
} finally {
try {
- tables.close();
+ if (tables != null) {
+ tables.close();
+ }
} catch (SQLException ignore) {
}
}