8000 Don't try to decode a class from a .java file · github/codeql@29d369f · GitHub
[go: up one dir, main page]

Skip to content

Commit 29d369f

Browse files
committed
Don't try to decode a class from a .java file
1 parent 0d21fa5 commit 29d369f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

java/kotlin-extractor/src/main/kotlin/utils/ClassNames.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
9090
}
9191
}
9292
is VirtualFileBasedSourceElement -> {
93-
return cSource.virtualFile
93+
if (cSource.virtualFile.name.endsWith(".class")) {
94+
// At least lately, despite VirtualFileBasedSourceElement being constructed on a BinaryJavaClass,
95+
// this can be a .java source file.
96+
return cSource.virtualFile
97+
}
9498
}
9599
is KotlinJvmBinarySourceElement -> {
96100
val binaryClass = cSource.binaryClass

0 commit comments

Comments
 (0)
0