@@ -86,7 +86,7 @@ class XIncludeFilter extends XMLFilterImpl {
86
86
// what if this isn't called????
87
87
// do I need to check this in startDocument() and push something
88
88
// there????
89
- override def setDocumentLocator (locator : Locator ) {
89
+ override def setDocumentLocator (locator : Locator ): Unit = {
90
90
locators push locator
91
91
val base = locator.getSystemId()
92
92
try {
@@ -113,7 +113,7 @@ class XIncludeFilter extends XMLFilterImpl {
113
113
*/
114
114
def insideIncludeElement (): Boolean = level != 0
115
115
116
- override def startElement (uri : String , localName : String , qName : String , atts1 : Attributes ) {
116
+ override def startElement (uri : String , localName : String , qName : String , atts1 : Attributes ): Unit = {
117
117
var atts = atts1
118
118
if (level == 0 ) { // We're not inside an xi:include element
119
119
@@ -169,7 +169,7 @@ class XIncludeFilter extends XMLFilterImpl {
169
169
}
170
170
}
171
171
172
- override def endElement (uri : String , localName : String , qName : String ) {
172
+ override def endElement (uri : String , localName : String , qName : String ): Unit = {
173
173
if (uri.equals(XINCLUDE_NAMESPACE )
174
174
&& localName.equals(" include" )) {
175
175
level -= 1
@@ -181,41 +181,41 @@ class XIncludeFilter extends XMLFilterImpl {
181
181
182
182
private var depth = 0
183
183
184
- override def startDocument () {
184
+ override def startDocument (): Unit = {
185
185
level = 0
186
186
if (depth == 0 ) super .startDocument()
187
187
depth += 1
188
188
}
189
189
190
- override def endDocument () {
190
+ override def endDocument (): Unit = {
191
191
locators.pop()
192
192
bases.pop() // pop the URL for the document itself
193
193
depth -= 1
194
194
if (depth == 0 ) super .endDocument()
195
195
}
196
196
197
197
// how do prefix mappings move across documents????
198
- override def startPrefixMapping (prefix : String , uri : String ) {
198
+ override def startPrefixMapping (prefix : String , uri : String ): Unit = {
199
199
if (level == 0 ) super .startPrefixMapping(prefix, uri)
200
200
}
201
201
202
- override def endPrefixMapping (prefix : String ) {
202
+ override def endPrefixMapping (prefix : String ): Unit = {
203
203
if (level == 0 ) super .endPrefixMapping(prefix)
204
204
}
205
205
206
- override def characters (ch : Array [Char ], start : Int , length : Int ) {
206
+ override def characters (ch : Array [Char ], start : Int , length : Int ): Unit = {
207
207
if (level == 0 ) super .characters(ch, start, length)
208
208
}
209
209
210
- override def ignorableWhitespace (ch : Array [Char ], start : Int , length : Int ) {
210
+ override def ignorableWhitespace (ch : Array [Char ], start : Int , length : Int ): Unit = {
211
211
if (level == 0 ) super .ignorableWhitespace(ch, start, length)
212
212
}
213
213
214
- override def processingInstruction (target : String , data : String ) {
214
+ override def processingInstruction (target : String , data : String ): Unit = {
215
215
if (level == 0 ) super .processingInstruction(target, data)
216
216
}
217
217
218
- override def skippedEntity (name : String ) {
218
+ override def skippedEntity (name : String ): Unit = {
219
219
if (level == 0 ) super .skippedEntity(name)
220
220
}
221
221
@@ -252,7 +252,7 @@ class XIncludeFilter extends XMLFilterImpl {
252
252
* be downloaded from the specified URL
253
253
* or if the encoding is not recognized
254
254
*/
255
- private def includeTextDocument (url : String , encoding1 : String ) {
255
+ private def includeTextDocument (url : String , encoding1 : String ): Unit = {
256
256
var encoding = encoding1
257
257
if (encoding == null || encoding.trim().equals(" " )) encoding = " UTF-8"
258
258
var source : URL = null
@@ -318,7 +318,7 @@ class XIncludeFilter extends XMLFilterImpl {
318
318
* @throws SAXException if the requested document cannot
319
319
* be downloaded from the specified URL.
320
320
*/
321
- private def includeXMLDocument (url : String ) {
321
+ private def includeXMLDocument (url : String ): Unit = {
322
322
val source =
323
323
try new URL (bases.peek(), url)
324
324
catch {
0 commit comments