From 7bbe33cffc2fb093a9572fdb5a74fae8c378d400 Mon Sep 17 00:00:00 2001 From: James Agnew Date: Mon, 17 Sep 2018 16:04:52 -0400 Subject: [PATCH] Finalizing 3.5.0 release --- .../src/main/java/ca/uhn/fhir/jpa/migrate/JdbcUtils.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/JdbcUtils.java b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/JdbcUtils.java index 989494806b2..8029e4f0025 100644 --- a/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/JdbcUtils.java +++ b/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/JdbcUtils.java @@ -42,6 +42,7 @@ public class JdbcUtils { * Retrieve all index names */ public static Set getIndexNames(DriverTypeEnum.ConnectionProperties theConnectionProperties, String theTableName) throws SQLException { + DataSource dataSource = Objects.requireNonNull(theConnectionProperties.getDataSource()); Connection connection = dataSource.getConnection(); return theConnectionProperties.getTxTemplate().execute(t -> { @@ -80,7 +81,7 @@ public class JdbcUtils { while (indexes.next()) { String indexName = indexes.getString("INDEX_NAME"); - if (indexName.equalsIgnoreCase(theIndexName)) { + if (theIndexName.equalsIgnoreCase(indexName)) { boolean nonUnique = indexes.getBoolean("NON_UNIQUE"); return !nonUnique; }