diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/meta/FieldMetaData.java b/openjpa-kernel/src/main/java/org/apache/openjpa/meta/FieldMetaData.java index 5053ba35f..0303f7d5e 100644 --- a/openjpa-kernel/src/main/java/org/apache/openjpa/meta/FieldMetaData.java +++ b/openjpa-kernel/src/main/java/org/apache/openjpa/meta/FieldMetaData.java @@ -1255,11 +1255,11 @@ public class FieldMetaData switch (getTypeCode()) { case JavaTypes.ARRAY: List l = JavaTypes.toList(val, _elem.getType(), true); - Collections.sort(l, comp); + Collections.sort(l, (Comparator) comp); return JavaTypes.toArray(l, _elem.getType()); case JavaTypes.COLLECTION: if (val instanceof List) - Collections.sort((List) val, comp); + Collections.sort((List) val, (Comparator) comp); return val; default: throw new MetaDataException(_loc.get("cant-order", this));