Skip to content

Commit

Permalink
[Bug #135] Improve bindable type resolution - remove instanceof.
Browse files Browse the repository at this point in the history
  • Loading branch information
ledsoft committed Feb 23, 2023
1 parent 5a3cf9c commit 5cee5cf
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -542,10 +542,10 @@ private void setAllNodesIris(ManagedType<?> entityType, SoqlNode node) {
}

private static Type<?> resolveBindableType(Attribute<?, ?> att) {
if (att instanceof SingularAttribute) {
return ((SingularAttribute<?, ?>) att).getType();
} else {
if (att.isCollection()) {
return ((PluralAttribute<?, ?, ?>) att).getElementType();
} else {
return ((SingularAttribute<?, ?>) att).getType();
}
}

Expand Down

0 comments on commit 5cee5cf

Please sign in to comment.