mirror of https://github.com/apache/openjpa.git
[OPENJPA-2810] try-with-resource to check jira-git integration
This commit is contained in:
parent
26b1f6be28
commit
2a57904355
|
@ -4662,11 +4662,9 @@ public class DBDictionary
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
beforeMetadataOperation(conn);
|
beforeMetadataOperation(conn);
|
||||||
ResultSet keys = null;
|
try (ResultSet keys = meta.getImportedKeys(getCatalogNameForMetadata(catalog),
|
||||||
try {
|
|
||||||
keys = meta.getImportedKeys(getCatalogNameForMetadata(catalog),
|
|
||||||
getSchemaNameForMetadata(schemaName),
|
getSchemaNameForMetadata(schemaName),
|
||||||
getTableNameForMetadata(tableName));
|
getTableNameForMetadata(tableName))) {
|
||||||
|
|
||||||
List<ForeignKey> importedKeyList = new ArrayList<>();
|
List<ForeignKey> importedKeyList = new ArrayList<>();
|
||||||
Map<FKMapKey, ForeignKey> fkMap = new HashMap<>();
|
Map<FKMapKey, ForeignKey> fkMap = new HashMap<>();
|
||||||
|
@ -4685,13 +4683,6 @@ public class DBDictionary
|
||||||
}
|
}
|
||||||
return (ForeignKey[]) importedKeyList.toArray
|
return (ForeignKey[]) importedKeyList.toArray
|
||||||
(new ForeignKey[importedKeyList.size()]);
|
(new ForeignKey[importedKeyList.size()]);
|
||||||
} finally {
|
|
||||||
if (keys != null) {
|
|
||||||
try {
|
|
||||||
keys.close();
|
|
||||||
} catch (Exception e) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue