File tree Expand file tree Collapse file tree 6 files changed +8
-7
lines changed
tagsoup/src/main/scala/as Expand file tree Collapse file tree 6 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import org.asynchttpclient
66import org .asynchttpclient .handler .resumable ._
77import java .io ._
88import java .nio .charset .Charset
9+ import java .io .Closeable
910
1011object Response {
1112 def apply [T ](f : asynchttpclient.Response => T ) = f
@@ -36,7 +37,7 @@ object File extends {
3637 val resumableHandler = new ResumableAsyncHandler
3738 with OkHandler [asynchttpclient.Response ]
3839 with CloseResourcesOnThrowableHandler [asynchttpclient.Response ] {
39- override lazy val closeable = Seq (fileHandler)
40+ override lazy val closeable : Seq [ Closeable ] = Seq (fileHandler)
4041 }
4142
4243 resumableHandler
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ private[dispatch] object InternalDefaults {
2828
2929 /** Sets a user agent, no timeout for requests */
3030 private object BasicDefaults extends Defaults {
31- lazy val timer = new HashedWheelTimer ()
31+ lazy val timer : Timer = new HashedWheelTimer ()
3232
3333 private val userAgent = " Dispatch/%s" format BuildInfo .version
3434 private val infinite = Duration .ofMillis(- 1 )
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ case class Http(
1313) extends HttpExecutor {
1414 import DefaultAsyncHttpClientConfig .Builder
1515
16- lazy val client = new DefaultAsyncHttpClient (clientBuilder.build)
16+ lazy val client : AsyncHttpClient = new DefaultAsyncHttpClient (clientBuilder.build)
1717
1818 /**
1919 * Returns a new instance replacing the underlying `clientBuilder` with a new instance that is
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ object Query {
1313 import org .jsoup .select .Elements
1414 def apply (query : String ): Response => Elements =
1515 Document (_).select(query)
16- }
16+ }
1717
1818object Clean {
1919 import org .jsoup .safety .Whitelist
Original file line number Diff line number Diff line change @@ -26,11 +26,11 @@ object Common {
2626 " -unchecked" ,
2727 " -language:higherKinds" ,
2828 " -language:implicitConversions" ,
29- // "-Xfatal-warnings",
3029 " -Xlint" ,
3130 " -Ywarn-dead-code" ,
3231 " -Ywarn-numeric-widen" ,
33- " -Ywarn-value-discard"
32+ " -Ywarn-value-discard" ,
33+ " -Xsource:3"
3434 ),
3535
3636 Compile / scalacOptions ++= {
Original file line number Diff line number Diff line change @@ -9,6 +9,6 @@ import org.ccil.cowan.tagsoup.jaxp.SAXFactoryImpl
99object NodeSeq extends (Response => XNodeSeq ) {
1010 lazy val parserFactory = new SAXFactoryImpl
1111 lazy val adapter = new NoBindingFactoryAdapter
12- def apply (r : Response ) =
12+ def apply (r : Response ): scala.xml. NodeSeq =
1313 adapter.loadXML(new InputSource (r.getResponseBodyAsStream), parserFactory.newSAXParser)
1414}
You can’t perform that action at this time.
0 commit comments