=htc fix some warnings

This commit is contained in:
Johannes Rudolph 2016-02-22 22:36:38 +01:00 committed by Konrad Malawski
parent 1a05433569
commit 4fcf08e7e8
7 changed files with 6 additions and 7 deletions

View file

@ -493,7 +493,7 @@ private[http] object HttpHeaderParser {
}
}
@tailrec private def scanHeaderNameAndReturnIndexOfColon(input: ByteString, start: Int, limit: Int)(ix: Int = start): Int =
@tailrec private def scanHeaderNameAndReturnIndexOfColon(input: ByteString, start: Int, limit: Int)(ix: Int): Int =
if (ix < limit)
byteChar(input, ix) match {
case ':' ix

View file

@ -89,7 +89,7 @@ private[http] object BodyPartRenderer {
r.get
}
private def renderBoundary(r: Rendering, boundary: String, suppressInitialCrLf: Boolean = false): Unit = {
private def renderBoundary(r: Rendering, boundary: String, suppressInitialCrLf: Boolean): Unit = {
if (!suppressInitialCrLf) r ~~ CrLf
r ~~ '-' ~~ '-' ~~ boundary ~~ CrLf
}

View file

@ -101,7 +101,7 @@ object WebSocketClientBlueprint {
}
case Left(problem)
result.success(InvalidUpgradeResponse(response, s"WebSocket server at $uri returned $problem"))
ctx.fail(throw new IllegalArgumentException(s"WebSocket upgrade did not finish because of '$problem'"))
ctx.fail(new IllegalArgumentException(s"WebSocket upgrade did not finish because of '$problem'"))
}
case other
throw new IllegalStateException(s"unexpected element of type ${other.getClass}")

View file

@ -420,7 +420,6 @@ private[parser] trait CommonRules { this: Parser with StringBuilding ⇒
| oneOrMore(DIGIT) ~ push(999999999999999999L)) ~ OWS)
private def digitInt(c: Char): Int = c - '0'
private def digitLong(c: Char): Long = (c - '0').toLong
private def createDateTime(year: Int, month: Int, day: Int, hour: Int, min: Int, sec: Int, wkday: Int) = {
val dt = DateTime(year, month, day, hour, min, sec)

View file

@ -228,7 +228,7 @@ private[http] class UriParser(val input: ParserInput,
private def getDecodedString(charset: Charset = uriParsingCharset) =
if (firstPercentIx >= 0) decode(sb.toString, charset, firstPercentIx)() else sb.toString
private def getDecodedStringAndLowerIfEncoded(charset: Charset = uriParsingCharset) =
private def getDecodedStringAndLowerIfEncoded(charset: Charset) =
if (firstPercentIx >= 0) decode(sb.toString, charset, firstPercentIx)().toRootLowerCase else sb.toString
private def createUriReference(): Uri = {

View file

@ -162,7 +162,7 @@ private[http] trait Rendering {
*/
def ~~%(lng: Long): this.type =
if (lng != 0) {
@tailrec def putChar(shift: Int = 60): this.type = {
@tailrec def putChar(shift: Int): this.type = {
this ~~ CharUtils.lowerHexDigit(lng >>> shift)
if (shift > 0) putChar(shift - 4) else this
}

View file

@ -125,7 +125,7 @@ package util {
override val shape = FlowShape(in, out)
override def createLogic(inheritedAttributes: Attributes): GraphStageLogic = new TimerGraphStageLogic(shape) {
var bytes = ByteString.newBuilder
val bytes = ByteString.newBuilder
private var emptyStream = false
override def preStart(): Unit = scheduleOnce("ToStrictTimeoutTimer", timeout)