Skip to content

Commit

Permalink
Access Relations.names conditionally in TextAnalysisFormat
Browse files Browse the repository at this point in the history
The `Relations.name` is available only when name hashing flag is enabled.

This fixes a regression introduced in
304796b.
  • Loading branch information
gkossakowski authored and eed3si9n committed Mar 21, 2014
1 parent 0ed7b7b commit 273b74b
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ object TextAnalysisFormat {
relations.memberRef else Relations.emptySourceDependencies
val inheritance = if (nameHashing)
relations.inheritance else Relations.emptySourceDependencies
val names = if (nameHashing) relations.names else Relation.empty[File, String]

writeRelation(Headers.directSrcDep, direct.internal)
writeRelation(Headers.directExternalDep, direct.external)
Expand All @@ -160,7 +161,7 @@ object TextAnalysisFormat {
writeRelation(Headers.inheritanceExternalDep, inheritance.external)

writeRelation(Headers.classes, relations.classes)
writeRelation(Headers.usedNames, relations.names)
writeRelation(Headers.usedNames, names)
}

def read(in: BufferedReader): Relations = {
Expand Down

0 comments on commit 273b74b

Please sign in to comment.