use Option constructor instead of Some for potentially null file lock

This commit is contained in:
Mark Harrah 2013-05-08 12:56:50 -04:00
parent 772d1aebf6
commit 6b32aa661c
1 changed files with 2 additions and 2 deletions

View File

@ -1212,7 +1212,7 @@ object Classpaths
(fullResolvers, ivyPaths, otherResolvers, moduleConfigurations, offline, checksums in update, appConfiguration, target, streams) map { (rs, paths, other, moduleConfs, off, check, app, t, s) =>
warnResolversConflict(rs ++: other, s.log)
val resCacheDir = t / "resolution-cache"
new InlineIvyConfiguration(paths, rs, other, moduleConfs, off, Some(lock(app)), check, Some(resCacheDir), s.log)
new InlineIvyConfiguration(paths, rs, other, moduleConfs, off, Option(lock(app)), check, Some(resCacheDir), s.log)
}
import java.util.LinkedHashSet
@ -1488,7 +1488,7 @@ trait BuildExtra extends BuildCommon
ivyConfiguration <<= (uri zipWith other) { case (u, otherTask) =>
otherTask map { case (base, app, pr, s) =>
val extraResolvers = if(addMultiResolver) pr :: Nil else Nil
new ExternalIvyConfiguration(base, u, Some(lock(app)), extraResolvers, s.log) }
new ExternalIvyConfiguration(base, u, Option(lock(app)), extraResolvers, s.log) }
}
}
private[this] def inBase(name: String): Initialize[File] = Def.setting { baseDirectory.value / name }