Minor, change method contract to @NotNull

This commit is contained in:
Denis Zharkov
2015-03-15 12:52:47 +03:00
parent 52ba8333dc
commit e37cf6b6a1
@@ -314,16 +314,16 @@ public class DescriptorUtils {
return superClassDescriptors;
}
@Nullable
@NotNull
public static JetType getSuperClassType(@NotNull ClassDescriptor classDescriptor) {
Collection<JetType> superclassTypes = classDescriptor.getTypeConstructor().getSupertypes();
for (JetType type : superclassTypes) {
ClassDescriptor superClassDescriptor = getClassDescriptorForType(type);
if (!isAny(superClassDescriptor) && superClassDescriptor.getKind() != ClassKind.TRAIT) {
if (superClassDescriptor.getKind() != ClassKind.TRAIT) {
return type;
}
}
return null;
return KotlinBuiltIns.getInstance().getAnyType();
}
@NotNull