Deprecate 'kotlin.throws' in favor of 'kotlin.jvm.Throws'

This commit is contained in:
Denis Zharkov
2015-09-10 16:42:22 +03:00
parent 7036b36a94
commit df97496a16
6 changed files with 34 additions and 6 deletions
@@ -522,7 +522,11 @@ public class FunctionCodegen {
@NotNull
public static String[] getThrownExceptions(@NotNull FunctionDescriptor function, @NotNull final JetTypeMapper mapper) {
AnnotationDescriptor annotation = function.getAnnotations().findAnnotation(new FqName("kotlin.Throws"));
AnnotationDescriptor annotation = function.getAnnotations().findAnnotation(new FqName("kotlin.throws"));
if (annotation == null) {
annotation = function.getAnnotations().findAnnotation(new FqName("kotlin.jvm.Throws"));
}
if (annotation == null) return ArrayUtil.EMPTY_STRING_ARRAY;
Collection<ConstantValue<?>> values = annotation.getAllValueArguments().values();