Annotation methods never return null

This commit is contained in:
Andrey Breslav
2014-01-14 16:29:39 +04:00
parent bf20c3a734
commit 84709ed363
16 changed files with 26 additions and 25 deletions
@@ -251,7 +251,8 @@ public final class JavaFunctionResolver {
: TypeUsage.MEMBER_SIGNATURE_COVARIANT;
JetType transformedType = typeTransformer.transformToType(returnType, typeUsage, typeVariableResolver);
if (annotationResolver.hasNotNullAnnotation(method)) {
// Annotation arguments are never null in Java
if (method.getContainingClass().isAnnotationType() || annotationResolver.hasNotNullAnnotation(method)) {
return TypeUtils.makeNotNullable(transformedType);
}
else {