Skip to content

Commit 0961c77

Browse files
authored
Merge pull request #304 from ashawley/more-deprecations
Small compiler and scala-library deprecations
2 parents 7adf518 + ec593f0 commit 0961c77

File tree

8 files changed

+15
-15
lines changed

8 files changed

+15
-15
lines changed

jvm/src/test/scala/scala/xml/ReuseNodesTest.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ object ReuseNodesTest {
3232
override def transform(ns: Seq[Node]): Seq[Node] = {
3333
val changed = ns flatMap transform
3434

35-
if (changed.length != ns.length || (changed, ns).zipped.exists(_ != _)) changed
35+
if (changed.length != ns.length || changed.zip(ns).exists(p => p._1 != p._2)) changed
3636
else ns
3737
}
3838
override def transform(n:Node): Seq[Node] = super.transform(n)

jvm/src/test/scala/scala/xml/XMLTest.scala

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -820,55 +820,55 @@ class XMLTestJVM {
820820
}
821821

822822
@UnitTest
823-
def xTokenTest {
823+
def xTokenTest: Unit = {
824824
val x = xml.parsing.ConstructingParser.fromSource(toSource("a"), false)
825825
assertEquals((): Unit, x.xToken('b'))
826826
}
827827

828828
@UnitTest(expected = classOf[FatalError])
829-
def xCharDataFailure {
829+
def xCharDataFailure: Unit = {
830830
val x = xml.parsing.ConstructingParser.fromSource(toSource(""), false)
831831

832832
x.xCharData
833833
}
834834

835835
@UnitTest(expected = classOf[FatalError])
836-
def xCommentFailure {
836+
def xCommentFailure: Unit = {
837837
val x = xml.parsing.ConstructingParser.fromSource(toSource(""), false)
838838

839839
x.xComment
840840
}
841841

842842
@UnitTest
843-
def xmlProcInstrTest {
843+
def xmlProcInstrTest: Unit = {
844844
val x = xml.parsing.ConstructingParser.fromSource(toSource("aa"), false)
845845

846846
assertEquals(new UnprefixedAttribute("aa", Text(""), Null), x.xmlProcInstr)
847847
}
848848

849849
@UnitTest(expected = classOf[FatalError])
850-
def notationDeclFailure {
850+
def notationDeclFailure: Unit = {
851851
val x = xml.parsing.ConstructingParser.fromSource(toSource(""), false)
852852

853853
x.notationDecl
854854
}
855855

856856
@UnitTest
857-
def pubidLiteralTest {
857+
def pubidLiteralTest: Unit = {
858858
val x = xml.parsing.ConstructingParser.fromSource(toSource(""), false)
859859

860860
assertEquals("", x.pubidLiteral)
861861
}
862862

863863
@UnitTest
864-
def xAttributeValueTest {
864+
def xAttributeValueTest: Unit = {
865865
val x = xml.parsing.ConstructingParser.fromSource(toSource("'"), false)
866866

867867
assertEquals("", x.xAttributeValue)
868868
}
869869

870870
@UnitTest
871-
def xEntityValueTest {
871+
def xEntityValueTest: Unit = {
872872
val x = xml.parsing.ConstructingParser.fromSource(toSource(""), false)
873873

874874
assertEquals("", x.xEntityValue)

shared/src/main/scala/scala/xml/dtd/ExternalID.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ package dtd
1818
sealed abstract class ExternalID extends parsing.TokenTests {
1919
def quoted(s: String) = {
2020
val c = if (s contains '"') '\'' else '"'
21-
c + s + c
21+
c.toString + s + c
2222
}
2323

2424
// public != null: PUBLIC " " publicLiteral " " [systemLiteral]

shared/src/main/scala/scala/xml/dtd/impl/DetWordAutom.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ private[dtd] abstract class DetWordAutom[T <: AnyRef] {
3434
val sb = new StringBuilder("[DetWordAutom nstates=")
3535
sb.append(nstates)
3636
sb.append(" finals=")
37-
val map = Map(finals.zipWithIndex map (_.swap): _*)
37+
val map = finals.zipWithIndex.map(_.swap).toMap
3838
sb.append(map.toString())
3939
sb.append(" delta=\n")
4040

shared/src/main/scala/scala/xml/dtd/impl/WordBerrySethi.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ private[dtd] abstract class WordBerrySethi extends BaseBerrySethi {
144144
if (x.isNullable) // initial state is final
145145
finals = finals.updated(0, finalTag)
146146

147-
val delta1 = immutable.Map(deltaq.zipWithIndex map (_.swap): _*)
147+
val delta1 = deltaq.zipWithIndex.map(_.swap).toMap
148148
val finalsArr = (0 until pos map (k => finals.getOrElse(k, 0))).toArray // 0 == not final
149149

150150
val deltaArr: Array[mutable.Map[_labelT, immutable.BitSet]] =

shared/src/main/scala/scala/xml/transform/BasicTransformer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ abstract class BasicTransformer extends Function1[Node, Node] {
3434
*/
3535
def transform(ns: Seq[Node]): Seq[Node] = {
3636
val changed = ns flatMap transform
37-
if (changed.length != ns.length || (changed, ns).zipped.exists(_ != _)) changed
37+
if (changed.length != ns.length || changed.zip(ns).exists(p => p._1 != p._2)) changed
3838
else ns
3939
}
4040

shared/src/test/scala/scala/xml/PatternMatching.scala renamed to shared/src/test/scala/scala/xml/PatternMatchingTest.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import org.junit.Test
55
import org.junit.Assert.assertTrue
66
import org.junit.Assert.assertEquals
77

8-
class PatternMatching extends {
8+
class PatternMatchingTest extends {
99
@Test
1010
def unprefixedAttribute: Unit = {
1111
val li = List("1", "2", "3", "4")

shared/src/test/scala/scala/xml/Transformers.scala renamed to shared/src/test/scala/scala/xml/TransformersTest.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import scala.xml.transform._
66
import org.junit.Test
77
import org.junit.Assert.assertEquals
88

9-
class Transformers {
9+
class TransformersTest {
1010

1111

1212
def transformer = new RuleTransformer(new RewriteRule {

0 commit comments

Comments
 (0)