[OLINGO-403] Fix

This commit is contained in:
Francesco Chicchiriccò 2014-08-13 17:53:10 +02:00
parent 0a80d5146b
commit 977905919c

View File

@ -56,13 +56,11 @@ public class EntityUUID implements Serializable {
if (type == null || !Serializable.class.isAssignableFrom(type)) { if (type == null || !Serializable.class.isAssignableFrom(type)) {
throw new IllegalArgumentException("Invalid Entity type class: " + type); throw new IllegalArgumentException("Invalid Entity type class: " + type);
} }
for (Class<?> clazz : ClassUtils.hierarchy(type, ClassUtils.Interfaces.INCLUDE)) { if (this.type == null) {
if (this.type == null for (Class<?> clazz : ClassUtils.hierarchy(type, ClassUtils.Interfaces.INCLUDE)) {
&& (clazz.getInterfaces().length == 0 if (ArrayUtils.contains(clazz.getInterfaces(), EntityType.class)) {
|| ArrayUtils.contains(clazz.getInterfaces(), Serializable.class) this.type = clazz;
|| ArrayUtils.contains(clazz.getInterfaces(), EntityType.class))) { }
this.type = clazz;
} }
} }
} }