File tree Expand file tree Collapse file tree
java/kotlin-extractor/src/main
java/com/semmle/extractor/java Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111
1212import com .github .codeql .Logger ;
1313import com .github .codeql .Severity ;
14- import static com .github .codeql .ClassNamesKt .getIrClassBinaryPath ;
14+ import static com .github .codeql .ClassNamesKt .getIrClassBinaryName ;
1515import static com .github .codeql .ClassNamesKt .getIrClassVirtualFile ;
1616
1717import org .jetbrains .kotlin .ir .declarations .IrClass ;
@@ -212,7 +212,7 @@ private File trapFileForClass(IrClass sym) {
212212 private final Map <String , String > memberTrapPaths = new LinkedHashMap <String , String >();
213213 private static final Pattern dots = Pattern .compile ("." , Pattern .LITERAL );
214214 private String trapFilePathForClass (IrClass sym ) {
215- String classId = getIrClassBinaryPath (sym );
215+ String classId = getIrClassBinaryName (sym );
216216 // TODO: Reinstate this?
217217 //if (getTrackClassOrigins())
218218 // classId += "-" + StringDigestor.digest(sym.getSourceFileId());
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import com.intellij.openapi.vfs.VirtualFile
1313
1414// Taken from Kotlin's interpreter/Utils.kt function 'internalName'
1515// Translates class names into their JLS section 13.1 binary name
16- fun getClassBinaryName (that : IrClass ): String {
16+ fun getIrClassBinaryName (that : IrClass ): String {
1717 val internalName = StringBuilder (that.name.asString())
1818 generateSequence(that as ? IrDeclarationParent ) { (it as ? IrDeclaration )?.parent }
1919 .drop(1 )
@@ -53,5 +53,5 @@ fun getIrClassBinaryPath(irClass: IrClass): String {
5353 // If a class location is known, replace the JAR delimiter !/:
5454 return getRawIrClassBinaryPath(irClass)?.replaceFirst(" !/" , " /" )
5555 // Otherwise, make up a fake location:
56- ? : " /!unknown-binary-location/${getClassBinaryName (irClass).replace(" ." , " /" )} .class"
56+ ? : " /!unknown-binary-location/${getIrClassBinaryName (irClass).replace(" ." , " /" )} .class"
5757}
You can’t perform that action at this time.
0 commit comments