Skip to content

Commit 6b9d546

Browse files
authored
Merge pull request #10457 from github/smowton/fix/java-really-unique-fixedHasLocation
Java: really return a unique location for non-source entities
2 parents 7c41219 + 3fa1f17 commit 6b9d546

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

java/ql/lib/semmle/code/Location.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ private predicate fixedHasLocation(Top l, Location loc, File f) {
216216
min(Location candidateLoc |
217217
hasLocation(l, candidateLoc)
218218
|
219-
candidateLoc order by candidateLoc.getFile().toString()
219+
candidateLoc order by candidateLoc.getFile().getAbsolutePath()
220220
) and
221221
not hasSourceLocation(l, _, _) and
222222
locations_default(loc, f, _, _, _, _)

0 commit comments

Comments
 (0)