aboutsummaryrefslogtreecommitdiffstats
path: root/scalding/src/main/scala
diff options
context:
space:
mode:
Diffstat (limited to 'scalding/src/main/scala')
-rw-r--r--scalding/src/main/scala/sandcrawler/CdxBackfillJob.scala10
1 files changed, 5 insertions, 5 deletions
diff --git a/scalding/src/main/scala/sandcrawler/CdxBackfillJob.scala b/scalding/src/main/scala/sandcrawler/CdxBackfillJob.scala
index 389a96a..963fb10 100644
--- a/scalding/src/main/scala/sandcrawler/CdxBackfillJob.scala
+++ b/scalding/src/main/scala/sandcrawler/CdxBackfillJob.scala
@@ -108,12 +108,12 @@ object CdxBackfillJob {
)
val lower = raw.toLowerCase()
- normalMime.foreach { case (key, value) =>
- if (lower.startsWith(key)) {
- return value
- }
+ normalMime.find { case (key, _) =>
+ lower.startsWith(key)
+ } match {
+ case Some((_, value)) => value
+ case None => lower
}
- lower
}
def isCdxLine(line: String) : Boolean = {