=htc fix some warnings
This commit is contained in:
parent
1a05433569
commit
4fcf08e7e8
7 changed files with 6 additions and 7 deletions
|
|
@ -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)
|
if (ix < limit)
|
||||||
byteChar(input, ix) match {
|
byteChar(input, ix) match {
|
||||||
case ':' ⇒ ix
|
case ':' ⇒ ix
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ private[http] object BodyPartRenderer {
|
||||||
r.get
|
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
|
if (!suppressInitialCrLf) r ~~ CrLf
|
||||||
r ~~ '-' ~~ '-' ~~ boundary ~~ CrLf
|
r ~~ '-' ~~ '-' ~~ boundary ~~ CrLf
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,7 @@ object WebSocketClientBlueprint {
|
||||||
}
|
}
|
||||||
case Left(problem) ⇒
|
case Left(problem) ⇒
|
||||||
result.success(InvalidUpgradeResponse(response, s"WebSocket server at $uri returned $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 ⇒
|
case other ⇒
|
||||||
throw new IllegalStateException(s"unexpected element of type ${other.getClass}")
|
throw new IllegalStateException(s"unexpected element of type ${other.getClass}")
|
||||||
|
|
|
||||||
|
|
@ -420,7 +420,6 @@ private[parser] trait CommonRules { this: Parser with StringBuilding ⇒
|
||||||
| oneOrMore(DIGIT) ~ push(999999999999999999L)) ~ OWS)
|
| oneOrMore(DIGIT) ~ push(999999999999999999L)) ~ OWS)
|
||||||
|
|
||||||
private def digitInt(c: Char): Int = c - '0'
|
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) = {
|
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)
|
val dt = DateTime(year, month, day, hour, min, sec)
|
||||||
|
|
|
||||||
|
|
@ -228,7 +228,7 @@ private[http] class UriParser(val input: ParserInput,
|
||||||
private def getDecodedString(charset: Charset = uriParsingCharset) =
|
private def getDecodedString(charset: Charset = uriParsingCharset) =
|
||||||
if (firstPercentIx >= 0) decode(sb.toString, charset, firstPercentIx)() else sb.toString
|
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
|
if (firstPercentIx >= 0) decode(sb.toString, charset, firstPercentIx)().toRootLowerCase else sb.toString
|
||||||
|
|
||||||
private def createUriReference(): Uri = {
|
private def createUriReference(): Uri = {
|
||||||
|
|
|
||||||
|
|
@ -162,7 +162,7 @@ private[http] trait Rendering {
|
||||||
*/
|
*/
|
||||||
def ~~%(lng: Long): this.type =
|
def ~~%(lng: Long): this.type =
|
||||||
if (lng != 0) {
|
if (lng != 0) {
|
||||||
@tailrec def putChar(shift: Int = 60): this.type = {
|
@tailrec def putChar(shift: Int): this.type = {
|
||||||
this ~~ CharUtils.lowerHexDigit(lng >>> shift)
|
this ~~ CharUtils.lowerHexDigit(lng >>> shift)
|
||||||
if (shift > 0) putChar(shift - 4) else this
|
if (shift > 0) putChar(shift - 4) else this
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -125,7 +125,7 @@ package util {
|
||||||
override val shape = FlowShape(in, out)
|
override val shape = FlowShape(in, out)
|
||||||
|
|
||||||
override def createLogic(inheritedAttributes: Attributes): GraphStageLogic = new TimerGraphStageLogic(shape) {
|
override def createLogic(inheritedAttributes: Attributes): GraphStageLogic = new TimerGraphStageLogic(shape) {
|
||||||
var bytes = ByteString.newBuilder
|
val bytes = ByteString.newBuilder
|
||||||
private var emptyStream = false
|
private var emptyStream = false
|
||||||
|
|
||||||
override def preStart(): Unit = scheduleOnce("ToStrictTimeoutTimer", timeout)
|
override def preStart(): Unit = scheduleOnce("ToStrictTimeoutTimer", timeout)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue