Skip to content

Commit 4c29c6d

Browse files
committed
fixed
1 parent 71f0922 commit 4c29c6d

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

catalogs/catalog-jdbc-common/src/main/java/org/apache/gravitino/catalog/jdbc/operation/JdbcDatabaseOperations.java

+1-4
Original file line numberDiff line numberDiff line change
@@ -113,15 +113,12 @@ public boolean exist(String databaseName) {
113113
String query = generateDatabaseExistSql(databaseName);
114114
try (Statement statement = connection.createStatement()) {
115115
try (ResultSet resultSet = statement.executeQuery(query)) {
116-
if (resultSet.next()) {
117-
return true;
118-
}
116+
return resultSet.next();
119117
}
120118
}
121119
} catch (SQLException sqlException) {
122120
throw this.exceptionMapper.toGravitinoException(sqlException);
123121
}
124-
return false;
125122
}
126123

127124
protected String generateDatabaseExistSql(String databaseName) {

0 commit comments

Comments
 (0)