Skip to content

Commit 250d495

Browse files
committed
Use a safe cast in DerbySqlAstTranslator
1 parent f9230bf commit 250d495

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,7 @@ protected void renderPartitionItem(Expression expression) {
244244
if ( expression instanceof Literal ) {
245245
appendSql( "'0'" );
246246
}
247-
else if ( expression instanceof Summarization ) {
248-
Summarization summarization = (Summarization) expression;
247+
else if ( expression instanceof Summarization summarization ) {
249248
appendSql( summarization.getKind().sqlText() );
250249
appendSql( OPEN_PARENTHESIS );
251250
renderCommaSeparated( summarization.getGroupings() );

0 commit comments

Comments
 (0)