From 6b32aa661ce95b99d837bb9fd21e60cc09083d91 Mon Sep 17 00:00:00 2001 From: Mark Harrah Date: Wed, 8 May 2013 12:56:50 -0400 Subject: [PATCH] use Option constructor instead of Some for potentially null file lock --- main/src/main/scala/sbt/Defaults.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main/src/main/scala/sbt/Defaults.scala b/main/src/main/scala/sbt/Defaults.scala index f7051caf8..0f694a30b 100755 --- a/main/src/main/scala/sbt/Defaults.scala +++ b/main/src/main/scala/sbt/Defaults.scala @@ -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 }