mirror of https://github.com/sbt/sbt.git
Fix another Codacy issue in ServerSpec
This commit is contained in:
parent
d75d95d653
commit
74ff6aa1ce
|
|
@ -108,7 +108,7 @@ object ServerSpec {
|
|||
val chunk0 = buffer.take(delimPos)
|
||||
buffer = buffer.drop(delimPos + 1)
|
||||
// remove \r at the end of line.
|
||||
val chunk1 = if (chunk0.isEmpty || chunk0.last != RetByte) chunk0 else chunk0.dropRight(1)
|
||||
val chunk1 = if (chunk0.lastOption contains RetByte) chunk0.dropRight(1) else chunk0
|
||||
Some(new String(chunk1.toArray, "utf-8"))
|
||||
} else None // no EOL yet, so skip this turn.
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue