Skip to content

Commit

Permalink
Remove PsiJavaFile cases from KSFileImpl
Browse files Browse the repository at this point in the history
now that we have KSFileJavaImpl.

(cherry picked from commit 7efd280)
  • Loading branch information
ting-yuan authored and KSP Auto Pick committed Aug 19, 2023
1 parent a9a15de commit 9021ffc
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import com.google.devtools.ksp.symbol.KSVisitor
import com.google.devtools.ksp.symbol.Location
import com.google.devtools.ksp.symbol.Origin
import com.intellij.psi.PsiFile
import com.intellij.psi.PsiJavaFile
import org.jetbrains.kotlin.analysis.api.symbols.KtFileSymbol
import org.jetbrains.kotlin.analysis.api.symbols.KtFunctionSymbol
import org.jetbrains.kotlin.analysis.api.symbols.KtNamedClassOrObjectSymbol
Expand All @@ -47,7 +46,6 @@ class KSFileImpl private constructor(private val ktFileSymbol: KtFileSymbol) : K
override val packageName: KSName by lazy {
when (psi) {
is KtFile -> KSNameImpl.getCached((psi as KtFile).packageFqName.asString())
is PsiJavaFile -> KSNameImpl.getCached((psi as PsiJavaFile).packageName)
else -> throw IllegalStateException("Unhandled psi file type ${psi.javaClass}")
}
}
Expand Down Expand Up @@ -99,7 +97,6 @@ class KSFileImpl private constructor(private val ktFileSymbol: KtFileSymbol) : K
return Restorable {
when (psi) {
is KtFile -> analyze { getCached(psi.getFileSymbol()) }
is PsiJavaFile -> null
else -> throw IllegalStateException("Unhandled psi file type ${psi.javaClass}")
}
}
Expand Down

0 comments on commit 9021ffc

Please sign in to comment.