mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
Kotlin: Simplify trapFilePathForDecl
This commit is contained in:
@@ -214,23 +214,17 @@ public class OdasaOutput {
|
|||||||
trapFilePathForDecl(sym, signature));
|
trapFilePathForDecl(sym, signature));
|
||||||
}
|
}
|
||||||
|
|
||||||
private final Map<String, String> memberTrapPaths = new LinkedHashMap<String, String>();
|
|
||||||
private static final Pattern dots = Pattern.compile(".", Pattern.LITERAL);
|
|
||||||
private String trapFilePathForDecl(IrDeclaration sym, String signature) {
|
private String trapFilePathForDecl(IrDeclaration sym, String signature) {
|
||||||
String binaryName = getIrDeclBinaryName(sym);
|
String binaryName = getIrDeclBinaryName(sym);
|
||||||
String binaryNameWithSignature = binaryName + signature;
|
String binaryNameWithSignature = binaryName + signature;
|
||||||
// TODO: Reinstate this?
|
// TODO: Reinstate this?
|
||||||
//if (getTrackClassOrigins())
|
//if (getTrackClassOrigins())
|
||||||
// classId += "-" + StringDigestor.digest(sym.getSourceFileId());
|
// classId += "-" + StringDigestor.digest(sym.getSourceFileId());
|
||||||
String result = memberTrapPaths.get(binaryNameWithSignature);
|
String result = CLASSES_DIR + "/" +
|
||||||
if (result == null) {
|
binaryName.replace('.', '/') +
|
||||||
result = CLASSES_DIR + "/" +
|
|
||||||
dots.matcher(binaryName).replaceAll("/") +
|
|
||||||
signature +
|
signature +
|
||||||
".members" +
|
".members" +
|
||||||
".trap.gz";
|
".trap.gz";
|
||||||
memberTrapPaths.put(binaryNameWithSignature, result);
|
|
||||||
}
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user