Skip to content

Commit

Permalink
Merge pull request #513 from jtjeferreira/scala_2.13
Browse files Browse the repository at this point in the history
scala 2.13 support
  • Loading branch information
eed3si9n authored Jul 16, 2019
2 parents 92e8a51 + 8932720 commit 2234d3c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Dependencies._
import Common._

ThisBuild / version := "1.7.1"
ThisBuild / version := "1.7.2"
ThisBuild / organization := "org.scalaxb"
ThisBuild / homepage := Option(url("http://scalaxb.org"))
ThisBuild / licenses := List("MIT License" -> url("https://github.com/eed3si9n/scalaxb/blob/master/LICENSE"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ trait GigahorseHttpClients extends HttpClients {
.withRequestTimeout(requestTimeout))

def request(in: String, address: java.net.URI, headers: Map[String, String]): String = {
val req = url(address.toString).post(in).withHeaders(headers.mapValues(List(_)))
val req = url(address.toString).post(in).withHeaders(headers.mapValues(List(_)).toMap)
Await.result(client.processFull(req, asString), connectionTimeout + requestTimeout)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ trait GigahorseHttpClientsAsync extends HttpClientsAsync {
.withRequestTimeout(requestTimeout))

def request(in: String, address: java.net.URI, headers: Map[String, String])(implicit ec: ExecutionContext): Future[String] = {
val req = url(address.toString).post(in).withHeaders(headers.mapValues(List(_)))
val req = url(address.toString).post(in).withHeaders(headers.mapValues(List(_)).toMap)
client.processFull(req, asString)
}
}
Expand Down
10 changes: 4 additions & 6 deletions cli/src/main/resources/scalaxb.scala.template
Original file line number Diff line number Diff line change
Expand Up @@ -821,14 +821,13 @@ class HexBinary(_vector: Vector[Byte]) extends scala.collection.IndexedSeq[Byte]

object HexBinary {
def apply(xs: Byte*): HexBinary = {
import scala.collection.breakOut
val vector: Vector[Byte] = (xs.toIndexedSeq map {x: Byte => x})(breakOut)
val vector: Vector[Byte] = xs.toVector
new HexBinary(vector)
}

def apply(value: String): HexBinary = {
val array = DatatypeConverter.parseHexBinary(value)
apply(array: _*)
apply(array.toSeq: _*)
}

def unapplySeq(x: HexBinary) = Some(x.vector)
Expand All @@ -843,14 +842,13 @@ class Base64Binary(_vector: Vector[Byte]) extends scala.collection.IndexedSeq[By

object Base64Binary {
def apply(xs: Byte*): Base64Binary = {
import scala.collection.breakOut
val vector: Vector[Byte] = (xs.toIndexedSeq map {x: Byte => x})(breakOut)
val vector: Vector[Byte] = xs.toVector
new Base64Binary(vector)
}

def apply(value: String): Base64Binary = {
val array = DatatypeConverter.parseBase64Binary(value)
apply(array: _*)
apply(array.toSeq: _*)
}

def unapplySeq(x: Base64Binary) = Some(x.vector)
Expand Down

0 comments on commit 2234d3c

Please sign in to comment.