From: Edoardo Vacchi Date: Fri, 13 Sep 2013 07:11:04 +0000 (+0200) Subject: NullPointerException in TableQuery.fetchMetadata() (#11403) X-Git-Tag: 7.1.7~45 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3a31dfe01db0607d3b1b7676a7bc6e96178eee6d;p=vaadin-framework.git NullPointerException in TableQuery.fetchMetadata() (#11403) Trivial patch. The finally block lacks a check for null before attempting to invoke table.close() Change-Id: Ib32f1d75fef4bd442652ca60a2b7df6aa45d7fa7 --- 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) { } }