Skip to content

Commit

Permalink
fix compilation on scala 2.11
Browse files Browse the repository at this point in the history
  • Loading branch information
hughsimpson committed Jun 5, 2024
1 parent 3e1b7fb commit 9373cd8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import java.net.{URI, URISyntaxException}
import java.util.Collections.{emptyMap => jEmptyMap, singletonList => jList}
import java.util.{List => JList, Map => JMap}
import scala.collection.mutable
import scala.jdk.CollectionConverters.{ListHasAsScala, MapHasAsJava, MapHasAsScala}
import scala.collection.JavaConverters._

class ApacheCxfClientHelper

Expand All @@ -25,7 +25,9 @@ object ApacheCxfClientHelper {
val uri: URI = getUri(request)

override def write(header: String, value: String): Unit = {
val headers: mutable.Map[String, String] = getAllHeaders(delegate).to(mutable.Map)
val builder = mutable.Map.newBuilder[String, String]
builder ++= getAllHeaders(delegate)
val headers: mutable.Map[String, String] = builder.result()
headers.put(header, value)
delegate.put(Message.PROTOCOL_HEADERS, headers.map(m => m._1 -> jList(m._2)).toMap.asJava)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import org.mockserver.model.HttpRequest.request
import org.mockserver.model.HttpResponse.response
import org.slf4j.LoggerFactory

import scala.jdk.CollectionConverters.SeqHasAsJava
import scala.collection.JavaConverters._

class MockServerExpectations(private val host: String, private val port: Int) {

Expand Down

0 comments on commit 9373cd8

Please sign in to comment.