diff options
author | Paul Phillips <paulp@improving.org> | 2012-12-28 13:18:42 -0800 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2013-01-05 01:39:16 +0300 |
commit | 1f1e36922af099d647931a61ebdf5cec97ab54ac (patch) | |
tree | 79fe8ab4e990498d6d16e64cfcefe6aa83dd14bc /src/compiler/scala/tools/nsc/doc/base/MemberLookupBase.scala | |
parent | 348c8fac9f897f9661f84e32949b8a4e0c99e93a (diff) | |
download | scala-1f1e36922af099d647931a61ebdf5cec97ab54ac.tar.gz scala-1f1e36922af099d647931a61ebdf5cec97ab54ac.tar.bz2 scala-1f1e36922af099d647931a61ebdf5cec97ab54ac.zip |
Made Symbol#associatedFile always return non-null
So we don't have to clutter everything with null checks.
Diffstat (limited to 'src/compiler/scala/tools/nsc/doc/base/MemberLookupBase.scala')
-rwxr-xr-x | src/compiler/scala/tools/nsc/doc/base/MemberLookupBase.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/doc/base/MemberLookupBase.scala b/src/compiler/scala/tools/nsc/doc/base/MemberLookupBase.scala index 35390adcd9..216157e19a 100755 --- a/src/compiler/scala/tools/nsc/doc/base/MemberLookupBase.scala +++ b/src/compiler/scala/tools/nsc/doc/base/MemberLookupBase.scala @@ -88,7 +88,7 @@ trait MemberLookupBase { // (4) if we still haven't found anything, create a tooltip Tooltip(query) case List(l) => l - case links => + case links => val chosen = chooseLink(links) def linkToString(link: LinkTo) = { val chosenInfo = @@ -203,11 +203,11 @@ trait MemberLookupBase { def findExternalLink(sym: Symbol, name: String): Option[LinkToExternal] = { val sym1 = if (sym == AnyClass || sym == AnyRefClass || sym == AnyValClass || sym == NothingClass) ListClass - else if (sym.isPackage) + else if (sym.isPackage) /* Get package object which has associatedFile ne null */ sym.info.member(newTermName("package")) else sym - Option(sym1.associatedFile) flatMap (_.underlyingSource) flatMap { src => + sym1.associatedFile.underlyingSource flatMap { src => val path = src.path settings.extUrlMapping get path map { url => LinkToExternal(name, url + "#" + name) |