FIR: Optimize case with no annotations on package
This commit is contained in:
committed by
TeamCityServer
parent
37785eb244
commit
38fa900e56
@@ -21,7 +21,7 @@ interface JavaClassFinder {
|
||||
fun findClass(request: Request): JavaClass?
|
||||
fun findClass(classId: ClassId): JavaClass? = findClass(Request(classId))
|
||||
|
||||
fun findPackage(fqName: FqName): JavaPackage?
|
||||
fun findPackage(fqName: FqName, mayHaveAnnotations: Boolean = true): JavaPackage?
|
||||
|
||||
fun knownClassNamesInPackage(packageFqName: FqName): Set<String>?
|
||||
}
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ class ReflectJavaClassFinder(private val classLoader: ClassLoader) : JavaClassFi
|
||||
return if (klass != null) ReflectJavaClass(klass) else null
|
||||
}
|
||||
|
||||
override fun findPackage(fqName: FqName): JavaPackage? {
|
||||
override fun findPackage(fqName: FqName, mayHaveAnnotations: Boolean): JavaPackage? {
|
||||
// We don't know which packages our class loader has and has not, so we behave as if it contains any package in the world
|
||||
return ReflectJavaPackage(fqName)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user