From 655087fcee354783988a2ed753ac3710aa265b82 Mon Sep 17 00:00:00 2001 From: "Aaron S. Hawley" Date: Tue, 20 Apr 2021 07:44:48 -0400 Subject: [PATCH] Drop the scala.xml.Properties --- build.sbt | 1 + .../scala-2.x/scala/xml/CompilerErrors.scala | 2 +- shared/src/main/scala/scala/xml/XML.scala | 5 ----- .../src/test/scala/scala/xml/Properties.scala | 19 +++++++++++++++++++ 4 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 shared/src/test/scala/scala/xml/Properties.scala diff --git a/build.sbt b/build.sbt index 6ddbeb97d..0409697c1 100644 --- a/build.sbt +++ b/build.sbt @@ -66,6 +66,7 @@ lazy val xml = crossProject(JSPlatform, JVMPlatform, NativePlatform) Seq( // because we reverted #279 exclude[DirectMissingMethodProblem]("scala.xml.Utility.escapeText"), + exclude[MissingClassProblem]("scala.xml.Properties*"), // New MiMa checks for generic signature changes exclude[IncompatibleSignatureProblem]("*"), // afaict this is just a JDK 8 vs 16 difference, producing a false positive when diff --git a/jvm/src/test/scala-2.x/scala/xml/CompilerErrors.scala b/jvm/src/test/scala-2.x/scala/xml/CompilerErrors.scala index 995fd64ed..4d3197890 100644 --- a/jvm/src/test/scala-2.x/scala/xml/CompilerErrors.scala +++ b/jvm/src/test/scala-2.x/scala/xml/CompilerErrors.scala @@ -8,7 +8,7 @@ class CompilerErrors extends CompilerTesting { // the error message here differs a bit by Scala version import util.Properties.versionNumberString val thing = - if (versionNumberString.startsWith("2.11") || versionNumberString.startsWith("2.12")) "method value" + if (versionNumberString.startsWith("2.12")) "method value" else "method" expectXmlError(s"""|overloaded $thing apply with alternatives: | (f: scala.xml.Node => Boolean)scala.xml.NodeSeq diff --git a/shared/src/main/scala/scala/xml/XML.scala b/shared/src/main/scala/scala/xml/XML.scala index ed7ad8336..d93d2ce08 100755 --- a/shared/src/main/scala/scala/xml/XML.scala +++ b/shared/src/main/scala/scala/xml/XML.scala @@ -118,8 +118,3 @@ object XML extends XMLLoader[Elem] { w.write(Utility.serialize(node, minimizeTags = minimizeTags).toString) } } - -object Properties extends scala.util.PropertiesTrait { - protected def propCategory = "scala-xml" - protected def pickJarBasedOn = classOf[scala.xml.Node] -} diff --git a/shared/src/test/scala/scala/xml/Properties.scala b/shared/src/test/scala/scala/xml/Properties.scala new file mode 100644 index 000000000..9f4db208c --- /dev/null +++ b/shared/src/test/scala/scala/xml/Properties.scala @@ -0,0 +1,19 @@ +/* + * Scala (https://www.scala-lang.org) + * + * Copyright EPFL and Lightbend, Inc. + * + * Licensed under Apache License 2.0 + * (http://www.apache.org/licenses/LICENSE-2.0). + * + * See the NOTICE file distributed with this work for + * additional information regarding copyright ownership. + */ + +package scala +package xml + +object Properties extends util.PropertiesTrait { + protected def propCategory = "scala-xml" + protected def pickJarBasedOn = classOf[scala.xml.Node] +}