mirror of https://github.com/sbt/sbt.git
Use Maybe rather than Option in IC
This commit is contained in:
parent
cddbb8dd12
commit
1ed64e4d5f
|
|
@ -31,8 +31,8 @@ object IC extends IncrementalCompiler[Analysis, AnalyzingCompiler]
|
|||
AnalyzingCompiler.compileSources(sourceJar :: Nil, targetJar, interfaceJar :: Nil, label, raw, log)
|
||||
}
|
||||
|
||||
def readCache(file: File): Option[(Analysis, CompileSetup)] =
|
||||
try { Some(readCacheUncaught(file)) } catch { case _: Exception => None }
|
||||
def readCache(file: File): Maybe[(Analysis, CompileSetup)] =
|
||||
try { Maybe.just(readCacheUncaught(file)) } catch { case _: Exception => Maybe.nothing() }
|
||||
|
||||
def readAnalysis(file: File): Analysis =
|
||||
try { readCacheUncaught(file)._1 } catch { case _: Exception => Analysis.Empty }
|
||||
|
|
|
|||
Loading…
Reference in New Issue