- if (effectiveStatement instanceof TypedefEffectiveStatement) {
- final TypeDefinition<?> type = ((TypedefEffectiveStatement) effectiveStatement).getTypeDefinition();
- if (!mutableTypeDefinitions.add(type)) {
- throw EffectiveStmtUtils.createNameCollisionSourceException(stmt, effectiveStatement);
- }
+ if (effectiveStatement instanceof TypedefEffectiveStatement typedef
+ && !mutableTypeDefinitions.add(typedef.getTypeDefinition())) {
+ throw EffectiveStmtUtils.createNameCollisionSourceException(stmt, effectiveStatement);