mirror of
https://github.com/github/codeql.git
synced 2025-12-22 11:46:32 +01:00
Merge pull request #10556 from igfoo/igfoo/memo
Kotlin: Simplify trapFilePathForDecl
This commit is contained in:
@@ -214,23 +214,17 @@ public class OdasaOutput {
|
||||
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) {
|
||||
String binaryName = getIrDeclBinaryName(sym);
|
||||
String binaryNameWithSignature = binaryName + signature;
|
||||
// TODO: Reinstate this?
|
||||
//if (getTrackClassOrigins())
|
||||
// classId += "-" + StringDigestor.digest(sym.getSourceFileId());
|
||||
String result = memberTrapPaths.get(binaryNameWithSignature);
|
||||
if (result == null) {
|
||||
result = CLASSES_DIR + "/" +
|
||||
dots.matcher(binaryName).replaceAll("/") +
|
||||
String result = CLASSES_DIR + "/" +
|
||||
binaryName.replace('.', '/') +
|
||||
signature +
|
||||
".members" +
|
||||
".trap.gz";
|
||||
memberTrapPaths.put(binaryNameWithSignature, result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user