Fix NPE on empty JVM name
#KT-9113 Fixed
This commit is contained in:
@@ -562,8 +562,8 @@ public class DescriptorUtils {
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public static String getJvmName(@NotNull Annotations annotations) {
|
||||
AnnotationDescriptor jvmNameAnnotation = getJvmNameAnnotation(annotations);
|
||||
public static String getJvmName(@NotNull Annotated annotated) {
|
||||
AnnotationDescriptor jvmNameAnnotation = getJvmNameAnnotation(annotated.getAnnotations());
|
||||
if (jvmNameAnnotation == null) return null;
|
||||
|
||||
Map<ValueParameterDescriptor, ConstantValue<?>> arguments = jvmNameAnnotation.getAllValueArguments();
|
||||
@@ -575,11 +575,6 @@ public class DescriptorUtils {
|
||||
return ((StringValue) name).getValue();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public static String getJvmName(@NotNull Annotated annotated) {
|
||||
return getJvmName(annotated.getAnnotations());
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public static AnnotationDescriptor getJvmNameAnnotation(@NotNull Annotations annotations) {
|
||||
AnnotationDescriptor jvmNameAnnotation = annotations.findAnnotation(JVM_NAME);
|
||||
|
||||
Reference in New Issue
Block a user