Skip to content

Commit d7b5275

Browse files
paulpadriaanm
authored andcommitted
Make all numeric coercions explicit.
Optimistically, this is preparation for a day when we don't let numeric types drift with the winds. Even without the optimism it's a good idea. It flushed out an undocumented change in the math package object relative to the methods being forwarded (a type is widened from what is returned in java) so I documented the intentionality of it. Managing type coercions manually is a bit tedious, no doubt, but it's not tedious enough to warrant abandoning type safety just because java did it.
1 parent 78832dc commit d7b5275

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class XIncluder(outs: OutputStream, encoding: String) extends ContentHandler wit
9595
// However, it is required if text contains ]]>
9696
// (The end CDATA section delimiter)
9797
else if (c == '>') out.write(">")
98-
else out.write(c)
98+
else out.write(c.toInt)
9999
i += 1
100100
}
101101
}

src/library/scala/xml/persistent/CachedFileStorage.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ abstract class CachedFileStorage(private val file1: File) extends Thread {
112112
override def run = {
113113
log("[run]\nstarting storage thread, checking every "+interval+" ms")
114114
while (true) {
115-
Thread.sleep( this.interval )
115+
Thread.sleep( this.interval.toLong )
116116
save()
117117
}
118118
}

0 commit comments

Comments
 (0)