No effective change, BeanCollectionUtil perform the instanceof Collection before instanceof Map check

This commit is contained in:
Rob Bygrave committed 2023-02-09 23:44:13 +13:00
1 parent 244d45674a
commit 564194042b
1 file changed
+3 -6
@@ -38,13 +38,10 @@ public final class BeanCollectionUtil {
// returns a collection of beans
return bc.getActualEntries();
}
if (o instanceof Map<?, ?>) {
// yes, we want the entrySet (to set the keys)
return ((Map<?, ?>) o).entrySet();
} else if (o instanceof Collection<?>) {
if (o instanceof Collection<?>) {
return ((Collection<?>) o);
} else if (o instanceof Map<?, ?>) {
return ((Map<?, ?>) o).entrySet();
}
throw new PersistenceException("expecting a Map or Collection but got " + o.getClass().getName());
}