mirror of
https://github.com/sbt/sbt.git
synced 2026-10-06 10:03:56 +02:00
Use Maybe rather than Option in IC
This commit is contained in:
committed by
Mark Harrah
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 }
|
||||
|
||||
Reference in New Issue
Block a user