Skip to content

Commit 571ed1d

Browse files
authored
Merge pull request #663 from som-snytt/x3
2 parents c4df0f0 + e5868ea commit 571ed1d

File tree

6 files changed

+13
-10
lines changed

6 files changed

+13
-10
lines changed

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ inThisBuild(Seq(
1111
),
1212
scmInfo := Some(ScmInfo(url("https://github.com/lightbend/mima"), "scm:git:git@github.com:lightbend/mima.git")),
1313
dynverVTagPrefix := false,
14-
scalacOptions := Seq("-feature", "-deprecation", "-Xlint"),
14+
scalacOptions ++= Seq("-feature", "-Xsource:3", "-Xlint", "-Wconf:cat=deprecation&msg=Stream|JavaConverters:s"),
1515
resolvers ++= (if (isStaging) List(stagingResolver) else Nil),
1616
publishTo := Some(if (isSnapshot.value) Opts.resolver.sonatypeSnapshots else Opts.resolver.sonatypeStaging),
1717
))

core/src/main/scala/com/typesafe/tools/mima/core/MimaUnpickler.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ object MimaUnpickler {
4242
}
4343

4444
def readEnd(): Int = buf.readNat() + buf.readIndex
45-
def readNameRef(): Name = at(buf.readNat(), readName)
45+
def readNameRef(): Name = at(buf.readNat(), () => readName())
4646
def readSymRef(): SymInfo = at(buf.readNat(), () => readSym(buf.readByte()))
4747
def readSymbolRef(): SymbolInfo = at(buf.readNat(), () => readSymbol(buf.readByte()))
4848
def readTypeRef(): TypeInfo = at(buf.readNat(), () => readType())
@@ -136,7 +136,7 @@ object MimaUnpickler {
136136
}
137137
}
138138

139-
for (num <- index.indices) at(num, readEntry)
139+
for (num <- index.indices) at(num, () => readEntry())
140140

141141
if (doPrint) {
142142
entries.iterator.zipWithIndex.filter(_._1 != null).foreach { case (entry, num) =>

core/src/main/scala/com/typesafe/tools/mima/core/PicklePrinter.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,13 +141,13 @@ object PicklePrinter {
141141
/** Returns the buffer as a sequence of (Int, Array[Byte]) representing
142142
* (tag, data) of the individual entries. Saves and restores buffer state.
143143
*/
144-
private def toIndexedSeq(buf: PickleBuffer): IndexedSeq[(Int, Array[Byte])] = {
144+
private def toIndexedSeq(buf: PickleBuffer): IndexedSeq[(Int, Array[Byte])] = (
145145
for (idx <- buf.createIndex) yield {
146146
buf.atIndex(idx) {
147147
val tag = buf.readByte()
148148
val len = buf.readNat()
149149
tag -> buf.bytes.slice(buf.readIndex, buf.readIndex + len)
150150
}
151151
}
152-
}
152+
).toIndexedSeq
153153
}

core/src/main/scala/com/typesafe/tools/mima/core/ProblemReporting.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ private[mima] object ProblemReporting {
88
val VersionRegex = """(\d+)\.?(\d+)?\.?(.*)?""".r
99
def int(versionPart: String) =
1010
Try(versionPart.replace("x", Short.MaxValue.toString).filter(_.isDigit).toInt).getOrElse(0)
11-
Ordering[(Int, Int, Int)].on[String] { case VersionRegex(x, y, z) => (int(x), int(y), int(z)) }
11+
Ordering[(Int, Int, Int)].on[String] {
12+
case VersionRegex(x, y, z) => (int(x), int(y), int(z))
13+
case bad => throw new IllegalArgumentException(bad)
14+
}
1215
}
1316

1417
def isReported(

core/src/main/scala/com/typesafe/tools/mima/core/TastyFormat.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ object TastyFormat {
3030
* Name = UTF8 Length UTF8-CodePoint*
3131
* QUALIFIED Length qualified_NameRef selector_NameRef -- A.B
3232
* EXPANDED Length qualified_NameRef selector_NameRef -- A$$B, semantically a NameKinds.ExpandedName
33-
* EXPANDPREFIX Length qualified_NameRef selector_NameRef -- A$B, prefix of expanded name, see NamedKinds.ExpandPrefixName
33+
* EXPANDPREFIX Length qualified_NameRef selector_NameRef -- A\$B, prefix of expanded name, see NamedKinds.ExpandPrefixName
3434
*
3535
* UNIQUE Length separator_NameRef uniqid_Nat underlying_NameRef? -- Unique name A<separator><number>
3636
* DEFAULTGETTER Length underlying_NameRef index_Nat -- DefaultGetter$<number>
3737
*
38-
* SUPERACCESSOR Length underlying_NameRef -- super$A
39-
* INLINEACCESSOR Length underlying_NameRef -- inline$A
38+
* SUPERACCESSOR Length underlying_NameRef -- super\$A
39+
* INLINEACCESSOR Length underlying_NameRef -- inline\$A
4040
* OBJECTCLASS Length underlying_NameRef -- A$ (name of the module class for module A)
4141
*
4242
* SIGNED Length original_NameRef resultSig_NameRef ParamSig* -- name + signature

core/src/main/scala/com/typesafe/tools/mima/lib/analyze/field/FieldChecker.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ private[analyze] object FieldChecker {
1111
if (oldfld.nonAccessible) None else {
1212
val newflds = newclazz.lookupClassFields(oldfld)
1313
if (newflds.hasNext) {
14-
val newfld = newflds.next
14+
val newfld = newflds.next()
1515
if (!newfld.isPublic) Some(InaccessibleFieldProblem(newfld))
1616
else if (oldfld.descriptor != newfld.descriptor) Some(IncompatibleFieldTypeProblem(oldfld, newfld))
1717
else if (oldfld.isStatic && !newfld.isStatic) Some(StaticVirtualMemberProblem(oldfld))

0 commit comments

Comments
 (0)