Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make it compile: fix exception generation + add shutdown() call to super

  • Loading branch information...
commit fdecbd01a32ae9ce084c859a8aa4b0a0e5fe554e 1 parent cbb5026
@jowens jowens authored
View
7 lib/template/src/main/scala/com/twitter/birdname/BirdNameServiceImpl.scala.erb
@@ -1,5 +1,6 @@
package com.twitter.birdname
+import com.twitter.conversions.time._
import com.twitter.logging.Logger
import com.twitter.util._
import java.util.concurrent.Executors
@@ -31,7 +32,7 @@ class BirdNameServiceImpl(config: BirdNameServiceConfig) extends BirdNameService
database.get(key) match {
case None =>
log.debug("get %s: miss", key)
- Future.exception(new BirdNameException("No such key"))
+ Future.exception(BirdNameException("No such key"))
case Some(value) =>
log.debug("get %s: hit", key)
Future(value)
@@ -43,4 +44,8 @@ class BirdNameServiceImpl(config: BirdNameServiceConfig) extends BirdNameService
database(key) = value
Future.Unit
}
+
+ def shutdown() = {
+ super.shutdown(0.seconds)
+ }
}
Please sign in to comment.
Something went wrong with that request. Please try again.