diff --git a/ebean-core/src/main/java/io/ebeaninternal/server/deploy/BeanCollectionUtil.java b/ebean-core/src/main/java/io/ebeaninternal/server/deploy/BeanCollectionUtil.java index aa8c72b5a..b75e305e4 100644 --- a/ebean-core/src/main/java/io/ebeaninternal/server/deploy/BeanCollectionUtil.java +++ b/ebean-core/src/main/java/io/ebeaninternal/server/deploy/BeanCollectionUtil.java @@ -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()); }