diff --git a/jvm/src/test/scala/scala/xml/ReuseNodesTest.scala b/jvm/src/test/scala/scala/xml/ReuseNodesTest.scala index d3b05a338..586fb92a0 100644 --- a/jvm/src/test/scala/scala/xml/ReuseNodesTest.scala +++ b/jvm/src/test/scala/scala/xml/ReuseNodesTest.scala @@ -1,9 +1,6 @@ package scala.xml import scala.xml.transform._ -import org.junit.Test -import org.junit.Assert.assertTrue -import org.junit.Assert.assertEquals import org.junit.Assert.assertSame import org.junit.experimental.theories.Theories import org.junit.experimental.theories.Theory diff --git a/jvm/src/test/scala/scala/xml/XMLSyntaxTest.scala b/jvm/src/test/scala/scala/xml/XMLSyntaxTest.scala index 16155bc58..48c5e1d22 100644 --- a/jvm/src/test/scala/scala/xml/XMLSyntaxTest.scala +++ b/jvm/src/test/scala/scala/xml/XMLSyntaxTest.scala @@ -2,10 +2,6 @@ package scala.xml import org.junit.Test import org.junit.Ignore -import org.junit.runner.RunWith -import org.junit.runners.JUnit4 -import org.junit.Assert.assertTrue -import org.junit.Assert.assertFalse import org.junit.Assert.assertEquals class XMLSyntaxTestJVM { diff --git a/jvm/src/test/scala/scala/xml/XMLTest.scala b/jvm/src/test/scala/scala/xml/XMLTest.scala index aea258486..1b4058629 100644 --- a/jvm/src/test/scala/scala/xml/XMLTest.scala +++ b/jvm/src/test/scala/scala/xml/XMLTest.scala @@ -3,15 +3,11 @@ package scala.xml import language.postfixOps import org.junit.{Test => UnitTest} -import org.junit.Ignore -import org.junit.runner.RunWith -import org.junit.runners.JUnit4 import org.junit.Assert.assertTrue import org.junit.Assert.assertFalse import org.junit.Assert.assertEquals import scala.xml.parsing.ConstructingParser import java.io.StringWriter -import java.io.BufferedOutputStream import java.io.ByteArrayOutputStream import java.io.StringReader import scala.collection.Iterable @@ -495,7 +491,6 @@ class XMLTestJVM { } import java.io.{ Console => _, _ } - import scala.io._ import scala.xml.parsing._ @UnitTest def dontLoop: Unit = { diff --git a/jvm/src/test/scala/scala/xml/parsing/PiParsingTest.scala b/jvm/src/test/scala/scala/xml/parsing/PiParsingTest.scala index d002eeb36..f560e998c 100644 --- a/jvm/src/test/scala/scala/xml/parsing/PiParsingTest.scala +++ b/jvm/src/test/scala/scala/xml/parsing/PiParsingTest.scala @@ -1,9 +1,6 @@ package scala.xml.parsing import org.junit.Test -import org.junit.Ignore -import org.junit.runner.RunWith -import org.junit.runners.JUnit4 import scala.xml.JUnitAssertsForXML.assertEquals class PiParsingTestJVM { diff --git a/jvm/src/test/scala/scala/xml/parsing/Ticket0632Test.scala b/jvm/src/test/scala/scala/xml/parsing/Ticket0632Test.scala index 3691071fa..40b1976ab 100644 --- a/jvm/src/test/scala/scala/xml/parsing/Ticket0632Test.scala +++ b/jvm/src/test/scala/scala/xml/parsing/Ticket0632Test.scala @@ -2,15 +2,13 @@ package scala.xml.parsing import org.junit.Test import org.junit.Ignore -import org.junit.runner.RunWith -import org.junit.runners.JUnit4 import scala.xml.JUnitAssertsForXML.assertEquals class Ticket0632TestJVM { import scala.io.Source.fromString import scala.xml.parsing.ConstructingParser.fromSource - import scala.xml.{NodeSeq, TopScope} + import scala.xml.TopScope private def parse(s:String) = fromSource(fromString(s), false).element(TopScope) @Test diff --git a/shared/src/main/scala/scala/xml/MetaData.scala b/shared/src/main/scala/scala/xml/MetaData.scala index fed10618d..02c228f69 100644 --- a/shared/src/main/scala/scala/xml/MetaData.scala +++ b/shared/src/main/scala/scala/xml/MetaData.scala @@ -11,7 +11,7 @@ package xml import Utility.sbToString import scala.annotation.tailrec -import scala.collection.{ AbstractIterable, Iterator } +import scala.collection.AbstractIterable /** * Copyright 2008 Google Inc. All Rights Reserved. diff --git a/shared/src/main/scala/scala/xml/NodeSeq.scala b/shared/src/main/scala/scala/xml/NodeSeq.scala index 22b218f07..c498279e9 100644 --- a/shared/src/main/scala/scala/xml/NodeSeq.scala +++ b/shared/src/main/scala/scala/xml/NodeSeq.scala @@ -43,7 +43,6 @@ object NodeSeq { * @version 1.0 */ abstract class NodeSeq extends AbstractSeq[Node] with immutable.Seq[Node] with SeqLike[Node, NodeSeq] with Equality { - import NodeSeq.seqToNodeSeq // import view magic for NodeSeq wrappers /** Creates a list buffer as builder for this class */ override protected[this] def newBuilder = NodeSeq.newBuilder diff --git a/shared/src/main/scala/scala/xml/Utility.scala b/shared/src/main/scala/scala/xml/Utility.scala index 5b96ccefb..467e57af3 100755 --- a/shared/src/main/scala/scala/xml/Utility.scala +++ b/shared/src/main/scala/scala/xml/Utility.scala @@ -10,7 +10,6 @@ package scala package xml import scala.collection.mutable -import parsing.XhtmlEntities import scala.language.implicitConversions /** @@ -105,7 +104,7 @@ object Utility extends AnyRef with parsing.TokenTests { val escMap = pairs map { case (s, c) => c -> ("&%s;" format s) } val unescMap = pairs ++ Map("apos" -> '\'') } - import Escapes.{ escMap, unescMap } + import Escapes.unescMap /** * Appends escaped string to `s`. diff --git a/shared/src/main/scala/scala/xml/XML.scala b/shared/src/main/scala/scala/xml/XML.scala index c8c26d8cf..649c8b029 100755 --- a/shared/src/main/scala/scala/xml/XML.scala +++ b/shared/src/main/scala/scala/xml/XML.scala @@ -9,10 +9,9 @@ package scala package xml -import parsing.NoBindingFactoryAdapter import factory.XMLLoader import java.io.{ File, FileDescriptor, FileInputStream, FileOutputStream } -import java.io.{ InputStream, Reader, StringReader, Writer } +import java.io.{ InputStream, Reader, StringReader } import java.nio.channels.Channels import scala.util.control.Exception.ultimately diff --git a/shared/src/main/scala/scala/xml/dtd/impl/DetWordAutom.scala b/shared/src/main/scala/scala/xml/dtd/impl/DetWordAutom.scala index 46dd3ebdf..5484b72cd 100644 --- a/shared/src/main/scala/scala/xml/dtd/impl/DetWordAutom.scala +++ b/shared/src/main/scala/scala/xml/dtd/impl/DetWordAutom.scala @@ -9,8 +9,6 @@ package scala package xml.dtd.impl -import scala.collection.{ mutable, immutable } - /** * A deterministic automaton. States are integers, where * 0 is always the only initial state. Transitions are represented @@ -26,7 +24,7 @@ import scala.collection.{ mutable, immutable } private[dtd] abstract class DetWordAutom[T <: AnyRef] { val nstates: Int val finals: Array[Int] - val delta: Array[mutable.Map[T, Int]] + val delta: Array[scala.collection.mutable.Map[T, Int]] val default: Array[Int] def isFinal(q: Int) = finals(q) != 0 diff --git a/shared/src/main/scala/scala/xml/dtd/impl/WordBerrySethi.scala b/shared/src/main/scala/scala/xml/dtd/impl/WordBerrySethi.scala index 24af4f207..8ab87daf5 100644 --- a/shared/src/main/scala/scala/xml/dtd/impl/WordBerrySethi.scala +++ b/shared/src/main/scala/scala/xml/dtd/impl/WordBerrySethi.scala @@ -23,7 +23,7 @@ import scala.collection.{ immutable, mutable } private[dtd] abstract class WordBerrySethi extends BaseBerrySethi { override val lang: WordExp - import lang.{ Alt, Eps, Letter, RegExp, Sequ, Star, _labelT } + import lang.{ Eps, Letter, RegExp, Sequ, _labelT } protected var labels: mutable.HashSet[_labelT] = _ // don't let this fool you, only labelAt is a real, surjective mapping diff --git a/shared/src/main/scala/scala/xml/factory/NodeFactory.scala b/shared/src/main/scala/scala/xml/factory/NodeFactory.scala index 4b57eafd9..36cb2c723 100644 --- a/shared/src/main/scala/scala/xml/factory/NodeFactory.scala +++ b/shared/src/main/scala/scala/xml/factory/NodeFactory.scala @@ -10,9 +10,6 @@ package scala package xml package factory -import parsing.{ FactoryAdapter, NoBindingFactoryAdapter } -import java.io.{ InputStream, Reader, StringReader, File, FileDescriptor, FileInputStream } - trait NodeFactory[A <: Node] { val ignoreComments = false val ignoreProcInstr = false diff --git a/shared/src/main/scala/scala/xml/include/sax/EncodingHeuristics.scala b/shared/src/main/scala/scala/xml/include/sax/EncodingHeuristics.scala index 1f3cebb86..6fff1a477 100644 --- a/shared/src/main/scala/scala/xml/include/sax/EncodingHeuristics.scala +++ b/shared/src/main/scala/scala/xml/include/sax/EncodingHeuristics.scala @@ -11,7 +11,6 @@ package xml package include.sax import java.io.InputStream -import scala.util.matching.Regex /** * `EncodingHeuristics` reads from a stream diff --git a/shared/src/main/scala/scala/xml/include/sax/XIncludeFilter.scala b/shared/src/main/scala/scala/xml/include/sax/XIncludeFilter.scala index 9287499af..49d901c8c 100644 --- a/shared/src/main/scala/scala/xml/include/sax/XIncludeFilter.scala +++ b/shared/src/main/scala/scala/xml/include/sax/XIncludeFilter.scala @@ -15,7 +15,7 @@ import scala.xml.include._ import org.xml.sax.{ Attributes, XMLReader, Locator } import org.xml.sax.helpers.{ XMLReaderFactory, XMLFilterImpl, NamespaceSupport, AttributesImpl } -import java.io.{ InputStream, BufferedInputStream, InputStreamReader, IOException, UnsupportedEncodingException } +import java.io.{ BufferedInputStream, InputStreamReader, IOException, UnsupportedEncodingException } import java.util.Stack import java.net.{ URL, MalformedURLException } diff --git a/shared/src/main/scala/scala/xml/include/sax/XIncluder.scala b/shared/src/main/scala/scala/xml/include/sax/XIncluder.scala index 5eb3611a1..ae1cd9dd0 100644 --- a/shared/src/main/scala/scala/xml/include/sax/XIncluder.scala +++ b/shared/src/main/scala/scala/xml/include/sax/XIncluder.scala @@ -11,9 +11,9 @@ package xml package include.sax import scala.collection.mutable -import org.xml.sax.{ ContentHandler, XMLReader, Locator, Attributes } +import org.xml.sax.{ ContentHandler, Locator, Attributes } import org.xml.sax.ext.LexicalHandler -import java.io.{ File, OutputStream, OutputStreamWriter, Writer, IOException } +import java.io.{ OutputStream, OutputStreamWriter, IOException } /** * XIncluder is a SAX `ContentHandler` that writes its XML document onto diff --git a/shared/src/main/scala/scala/xml/parsing/FactoryAdapter.scala b/shared/src/main/scala/scala/xml/parsing/FactoryAdapter.scala index fc1beed04..a8b5c887f 100644 --- a/shared/src/main/scala/scala/xml/parsing/FactoryAdapter.scala +++ b/shared/src/main/scala/scala/xml/parsing/FactoryAdapter.scala @@ -10,7 +10,6 @@ package scala package xml package parsing -import java.io.{ InputStream, Reader, File, FileDescriptor, FileInputStream } import scala.collection.{ mutable, Iterator } import org.xml.sax.Attributes import org.xml.sax.helpers.DefaultHandler diff --git a/shared/src/main/scala/scala/xml/parsing/MarkupParserCommon.scala b/shared/src/main/scala/scala/xml/parsing/MarkupParserCommon.scala index 110f04756..9a64bb077 100644 --- a/shared/src/main/scala/scala/xml/parsing/MarkupParserCommon.scala +++ b/shared/src/main/scala/scala/xml/parsing/MarkupParserCommon.scala @@ -10,10 +10,6 @@ package scala package xml package parsing -import scala.io.Source -import scala.annotation.switch -import Utility.Escapes.{ pairs => unescape } - import Utility.SU /** diff --git a/shared/src/main/scala/scala/xml/persistent/CachedFileStorage.scala b/shared/src/main/scala/scala/xml/persistent/CachedFileStorage.scala index 4b1e2bc09..e697fc75c 100644 --- a/shared/src/main/scala/scala/xml/persistent/CachedFileStorage.scala +++ b/shared/src/main/scala/scala/xml/persistent/CachedFileStorage.scala @@ -11,7 +11,6 @@ package xml package persistent import java.io.{ File, FileOutputStream } -import java.nio.ByteBuffer import java.nio.channels.Channels import java.lang.Thread diff --git a/shared/src/test/scala/scala/xml/AttributeTest.scala b/shared/src/test/scala/scala/xml/AttributeTest.scala index 67b289748..8943a0a00 100644 --- a/shared/src/test/scala/scala/xml/AttributeTest.scala +++ b/shared/src/test/scala/scala/xml/AttributeTest.scala @@ -1,11 +1,6 @@ package scala.xml import org.junit.Test -import org.junit.Ignore -import org.junit.runner.RunWith -import org.junit.runners.JUnit4 -import org.junit.Assert.assertTrue -import org.junit.Assert.assertFalse import org.junit.Assert.assertEquals class AttributeTest { diff --git a/shared/src/test/scala/scala/xml/MetaDataTest.scala b/shared/src/test/scala/scala/xml/MetaDataTest.scala index 46b598c3a..87be69b82 100644 --- a/shared/src/test/scala/scala/xml/MetaDataTest.scala +++ b/shared/src/test/scala/scala/xml/MetaDataTest.scala @@ -1,9 +1,6 @@ package scala.xml import org.junit.Test -import org.junit.Ignore -import org.junit.runner.RunWith -import org.junit.runners.JUnit4 import org.junit.Assert.assertEquals class MetaDataTest { diff --git a/shared/src/test/scala/scala/xml/PrintEmptyElementsTest.scala b/shared/src/test/scala/scala/xml/PrintEmptyElementsTest.scala index f5270b473..a1d9b11cc 100644 --- a/shared/src/test/scala/scala/xml/PrintEmptyElementsTest.scala +++ b/shared/src/test/scala/scala/xml/PrintEmptyElementsTest.scala @@ -1,9 +1,6 @@ package scala.xml import org.junit.Test -import org.junit.Ignore -import org.junit.runner.RunWith -import org.junit.runners.JUnit4 import JUnitAssertsForXML.assertEquals class PrintEmptyElementsTest { diff --git a/shared/src/test/scala/scala/xml/UtilityTest.scala b/shared/src/test/scala/scala/xml/UtilityTest.scala index eba631efb..f6b3828fa 100644 --- a/shared/src/test/scala/scala/xml/UtilityTest.scala +++ b/shared/src/test/scala/scala/xml/UtilityTest.scala @@ -1,9 +1,6 @@ package scala.xml import org.junit.Test -import org.junit.Ignore -import org.junit.runner.RunWith -import org.junit.runners.JUnit4 import org.junit.Assert.assertTrue import org.junit.Assert.assertFalse import org.junit.Assert.assertEquals diff --git a/shared/src/test/scala/scala/xml/XMLEmbeddingTest.scala b/shared/src/test/scala/scala/xml/XMLEmbeddingTest.scala index 81c69bfb3..398ab6dde 100644 --- a/shared/src/test/scala/scala/xml/XMLEmbeddingTest.scala +++ b/shared/src/test/scala/scala/xml/XMLEmbeddingTest.scala @@ -1,11 +1,6 @@ package scala.xml import org.junit.Test -import org.junit.Ignore -import org.junit.runner.RunWith -import org.junit.runners.JUnit4 -import org.junit.Assert.assertTrue -import org.junit.Assert.assertFalse import org.junit.Assert.assertEquals class XMLEmbeddingTest { @@ -20,4 +15,4 @@ class XMLEmbeddingTest { assertEquals("{}{}{}", za.text) } -} \ No newline at end of file +} diff --git a/shared/src/test/scala/scala/xml/XMLSyntaxTest.scala b/shared/src/test/scala/scala/xml/XMLSyntaxTest.scala index da3c34c8e..89b9bdbbc 100644 --- a/shared/src/test/scala/scala/xml/XMLSyntaxTest.scala +++ b/shared/src/test/scala/scala/xml/XMLSyntaxTest.scala @@ -1,9 +1,6 @@ package scala.xml import org.junit.Test -import org.junit.Ignore -import org.junit.runner.RunWith -import org.junit.runners.JUnit4 import org.junit.Assert.assertTrue import org.junit.Assert.assertFalse import org.junit.Assert.assertEquals diff --git a/shared/src/test/scala/scala/xml/XMLTest.scala b/shared/src/test/scala/scala/xml/XMLTest.scala index 316517dfd..ac2f4347f 100644 --- a/shared/src/test/scala/scala/xml/XMLTest.scala +++ b/shared/src/test/scala/scala/xml/XMLTest.scala @@ -3,17 +3,11 @@ package scala.xml import language.postfixOps import org.junit.{Test => UnitTest} -import org.junit.Ignore -import org.junit.runner.RunWith -import org.junit.runners.JUnit4 import org.junit.Assert.assertTrue import org.junit.Assert.assertFalse import org.junit.Assert.assertEquals // import scala.xml.parsing.ConstructingParser import java.io.StringWriter -import java.io.BufferedOutputStream -import java.io.ByteArrayOutputStream -import java.io.StringReader import scala.collection.Iterable import scala.xml.Utility.sort @@ -23,8 +17,6 @@ object XMLTest { } class XMLTest { - import XMLTest.{ e, sc } - @UnitTest def nodeSeq: Unit = { val p = @@ -248,8 +240,6 @@ class XMLTest { assertTrue(x.toString.matches(".*xmlns:dog=\"http://dog.com\".*")); } - import NodeSeq.seqToNodeSeq - val ax = diff --git a/shared/src/test/scala/scala/xml/parsing/PiParsingTest.scala b/shared/src/test/scala/scala/xml/parsing/PiParsingTest.scala index fedf38dc5..cca701b31 100644 --- a/shared/src/test/scala/scala/xml/parsing/PiParsingTest.scala +++ b/shared/src/test/scala/scala/xml/parsing/PiParsingTest.scala @@ -1,24 +1,16 @@ package scala.xml.parsing import org.junit.Test -import org.junit.Ignore -import org.junit.runner.RunWith -import org.junit.runners.JUnit4 import scala.xml.JUnitAssertsForXML.assertEquals class PiParsingTest { - - import scala.io.Source.fromString - import scala.xml.TopScope - @Test def piNoWSLiteral: Unit = { val expected = "ab" assertEquals(expected, ab) } - @Test def piLiteral: Unit = { val expected = " a b " diff --git a/shared/src/test/scala/scala/xml/parsing/Ticket0632Test.scala b/shared/src/test/scala/scala/xml/parsing/Ticket0632Test.scala index 8b939118a..8adbd2503 100644 --- a/shared/src/test/scala/scala/xml/parsing/Ticket0632Test.scala +++ b/shared/src/test/scala/scala/xml/parsing/Ticket0632Test.scala @@ -1,16 +1,10 @@ package scala.xml.parsing import org.junit.Test -import org.junit.Ignore -import org.junit.runner.RunWith -import org.junit.runners.JUnit4 import scala.xml.JUnitAssertsForXML.assertEquals class Ticket0632Test { - import scala.io.Source.fromString - import scala.xml.{NodeSeq, TopScope} - @Test def singleAmp: Unit = { val expected = ""