mirror of https://github.com/sbt/sbt.git
[2.x] refactor: Remove unnecessary match (#9539)
This commit is contained in:
parent
c407f37739
commit
040eaaa062
|
|
@ -74,12 +74,12 @@ private[sbt] object CrossJava {
|
|||
val ds =
|
||||
if (!first.contains(".") && first.contains("u")) splitDot(first.replaceFirst("u", ".0."))
|
||||
else splitDot(first)
|
||||
val nums = ds.takeWhile(
|
||||
_ match {
|
||||
val nums = ds
|
||||
.takeWhile {
|
||||
case Num(_) => true
|
||||
case _ => false
|
||||
}
|
||||
) map { _.toLong }
|
||||
.map { _.toLong }
|
||||
if (nums.isEmpty) {
|
||||
sys.error(s"Invalid SDKMAN Java version: $version")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ private[sbt] class ServerSessionImpl(
|
|||
.deserializeJsonMessage(frame)
|
||||
.fold(
|
||||
errorDesc => onInvalidFrame(frame, errorDesc),
|
||||
_ match {
|
||||
{
|
||||
case msg: JsonRpcRequestMessage => onRequest(msg)
|
||||
case msg: JsonRpcResponseMessage => onResponse(msg)
|
||||
case msg: JsonRpcNotificationMessage => onNotification(msg)
|
||||
|
|
|
|||
Loading…
Reference in New Issue