Skip to content

Commit 1276924

Browse files
paulpadriaanm
authored andcommitted
Tore out some unnecessary ambiguity-creating al...
Tore out some unnecessary ambiguity-creating aliases in the XML package object. I have a feeling we'll be traversing this kind of territory again. Closes #3264, no review.
1 parent 4bbe3c0 commit 1276924

File tree

4 files changed

+5
-9
lines changed

4 files changed

+5
-9
lines changed

src/library/scala/xml/factory/XMLLoader.scala

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ package factory
1414
import javax.xml.parsers.SAXParserFactory
1515
import parsing.{ FactoryAdapter, NoBindingFactoryAdapter }
1616
import java.io.{ InputStream, Reader, StringReader, File, FileDescriptor, FileInputStream }
17+
import java.net.URL
1718

1819
/** Presents collection of XML loading methods which use the parser
1920
* created by "def parser".

src/library/scala/xml/include/sax/XIncludeFilter.scala

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,15 @@
1010

1111
package scala.xml
1212
package include.sax
13+
1314
import scala.xml.include._
1415

1516
import org.xml.sax.{ Attributes, XMLReader, Locator }
1617
import org.xml.sax.helpers.{ XMLReaderFactory, XMLFilterImpl, NamespaceSupport, AttributesImpl }
1718

18-
import java.io.{ InputStream, BufferedInputStream, InputStreamReader }
19+
import java.io.{ InputStream, BufferedInputStream, InputStreamReader, IOException, UnsupportedEncodingException }
1920
import java.util.Stack
21+
import java.net.{ URL, MalformedURLException }
2022

2123
/**
2224
* <p>

src/library/scala/xml/include/sax/XIncluder.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import collection.mutable.Stack
1616

1717
import org.xml.sax.{ ContentHandler, XMLReader, Locator, Attributes }
1818
import org.xml.sax.ext.LexicalHandler
19-
import java.io.{ File, OutputStream, OutputStreamWriter, Writer }
19+
import java.io.{ File, OutputStream, OutputStreamWriter, Writer, IOException }
2020

2121
/** XIncluder is a SAX <code>ContentHandler</code>
2222
* that writes its XML document onto an output stream after resolving

src/library/scala/xml/package.scala

-7
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,5 @@ package object xml {
77
type SAXParseException = org.xml.sax.SAXParseException
88
type EntityResolver = org.xml.sax.EntityResolver
99
type InputSource = org.xml.sax.InputSource
10-
1110
type SAXParser = javax.xml.parsers.SAXParser
12-
13-
type IOException = java.io.IOException
14-
type UnsupportedEncodingException = java.io.UnsupportedEncodingException
15-
16-
type URL = java.net.URL
17-
type MalformedURLException = java.net.MalformedURLException
1811
}

0 commit comments

Comments
 (0)