Rename JvmClassName.getFqName() and add a warning
All usages of this method as of right now seem wrong, as they don't work in the case of classes which contain dollars in their names -- dollars get replaced to dots
This commit is contained in:
+4
-1
@@ -77,8 +77,11 @@ public class JvmClassName {
|
||||
this.internalName = internalName;
|
||||
}
|
||||
|
||||
/**
|
||||
* WARNING: internal name cannot be converted to FQ name for a class which contains dollars in the name
|
||||
*/
|
||||
@NotNull
|
||||
public FqName getFqName() {
|
||||
public FqName getFqNameForClassNameWithoutDollars() {
|
||||
if (fqName == null) {
|
||||
fqName = new FqName(internalNameToFqName(internalName));
|
||||
}
|
||||
|
||||
+2
-1
@@ -210,7 +210,8 @@ public class AnnotationDescriptorDeserializer implements AnnotationDeserializer
|
||||
|
||||
@NotNull
|
||||
private ClassDescriptor resolveClass(@NotNull JvmClassName className) {
|
||||
ClassDescriptor annotationClass = javaClassResolver.resolveClass(className.getFqName(), IGNORE_KOTLIN_SOURCES);
|
||||
ClassDescriptor annotationClass = javaClassResolver.resolveClass(className.getFqNameForClassNameWithoutDollars(),
|
||||
IGNORE_KOTLIN_SOURCES);
|
||||
return annotationClass != null ? annotationClass : ErrorUtils.getErrorClass();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user