Skip to content

Commit 47cd06c

Browse files
jrenaatmbellade
authored andcommitted
HHH-17344 - Fix potential NPE
Signed-off-by: Jan Schatteman <[email protected]>
1 parent 4880e73 commit 47cd06c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

hibernate-community-dialects/src/main/java/org/hibernate/community/dialect/DB2zLegacyDialect.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ protected <T extends JdbcOperation> SqlAstTranslator<T> buildTranslator(
237237

238238
@Override
239239
public String rowId(String rowId) {
240-
return rowId.isEmpty() ? "rowid_" : rowId;
240+
return rowId == null || rowId.isEmpty() ? "rowid_" : rowId;
241241
}
242242

243243
@Override

hibernate-core/src/main/java/org/hibernate/dialect/DB2iDialect.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ protected <T extends JdbcOperation> SqlAstTranslator<T> buildTranslator(
158158

159159
@Override
160160
public String rowId(String rowId) {
161-
return rowId.isEmpty() ? "rowid_" : rowId;
161+
return rowId == null || rowId.isEmpty() ? "rowid_" : rowId;
162162
}
163163

164164
@Override

hibernate-core/src/main/java/org/hibernate/dialect/DB2zDialect.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ protected <T extends JdbcOperation> SqlAstTranslator<T> buildTranslator(
226226

227227
@Override
228228
public String rowId(String rowId) {
229-
return rowId.isEmpty() ? "rowid_" : rowId;
229+
return rowId == null || rowId.isEmpty() ? "rowid_" : rowId;
230230
}
231231

232232
@Override

0 commit comments

Comments
 (0)