Skip to content

Commit 587c9d8

Browse files
authored
Merge pull request #49 from SethTisue/test-on-jdk11
add JDK 11 to Travis-CI matrix
2 parents f97b661 + 71bb5b4 commit 587c9d8

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

.travis.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,6 @@ env:
1313

1414
script: admin/build.sh
1515

16-
jdk: oraclejdk8
16+
jdk:
17+
- oraclejdk8
18+
- openjdk11

build.sbt

+4-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ scalaVersionsByJvm in ThisBuild := {
66
val v213 = "2.13.0-M3"
77
Map(
88
8 -> List(v213 -> true),
9-
9 -> List(v213 -> false))
9+
11 -> List(v213 -> false))
1010
}
1111

1212
scalacOptions in ThisBuild ++= Seq("-deprecation", "-feature", "-Xfatal-warnings")
@@ -53,7 +53,9 @@ lazy val core = project.in(file("core")).settings(scalaModuleSettings).settings(
5353
)
5454

5555
lazy val junit = project.in(file("junit")).settings(
56-
libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % "test",
56+
libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % Test,
57+
// for javax.xml.bind.DatatypeConverter, used in SerializationStabilityTest
58+
libraryDependencies += "javax.xml.bind" % "jaxb-api" % "2.3.0" % Test,
5759
testOptions += Tests.Argument(TestFrameworks.JUnit, "-a", "-v"),
5860
fork in Test := true,
5961
disablePublishing

junit/src/test/scala/scala/SerializationStabilityTest.scala

+4-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ object SerializationStability extends App {
3030
def patch(file: File, line: Int, prevResult: String, result: String): Unit = {
3131
amend(file) {
3232
content =>
33-
content.lines.toList.zipWithIndex.map {
33+
// Predef.augmentString = work around scala/bug#11125 on JDK 11
34+
augmentString(content).lines.toList.zipWithIndex.map {
3435
case (content, i) if i == line - 1 =>
3536
val newContent = content.replaceAllLiterally(quote(prevResult), quote(result))
3637
if (newContent != content)
@@ -50,7 +51,8 @@ object SerializationStability extends App {
5051
val newComment = s" // Generated on $timestamp with Scala ${scala.util.Properties.versionString})"
5152
amend(file) {
5253
content =>
53-
content.lines.toList.map {
54+
// Predef.augmentString = work around scala/bug#11125 on JDK 11
55+
augmentString(content).lines.toList.map {
5456
f => f.replaceAll("""^ +// Generated on.*""", newComment)
5557
}.mkString("\n")
5658
}

0 commit comments

Comments
 (0)