Skip to content

Commit b33c894

Browse files
committed
use safe casts
1 parent 191e634 commit b33c894

File tree

1 file changed

+4
-4
lines changed
  • hibernate-core/src/main/java/org/hibernate/tool/schema

1 file changed

+4
-4
lines changed

hibernate-core/src/main/java/org/hibernate/tool/schema/Action.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,8 @@ public static Action interpretJpaSetting(Object value) {
225225
return NONE;
226226
}
227227

228-
if ( value instanceof Action ) {
229-
return (Action) value;
228+
if ( value instanceof Action action ) {
229+
return action;
230230
}
231231

232232
final String name = value.toString().trim();
@@ -277,8 +277,8 @@ public static Action interpretHbm2ddlSetting(Object value) {
277277
return NONE;
278278
}
279279

280-
if ( value instanceof Action ) {
281-
return (Action) value;
280+
if ( value instanceof Action action ) {
281+
return action;
282282
}
283283

284284
final String name = value.toString().trim();

0 commit comments

Comments
 (0)