Fixing tests after annotations changed

This commit is contained in:
Andrey Breslav
2012-12-10 16:44:41 +04:00
parent 5ad7be38bc
commit 6141467499
4 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -58,7 +58,7 @@ private class FunctionComparator<T>(vararg val functions: T.() -> Any?): Compar
return "FunctionComparator${functions.toList()}"
}
public override fun compare(o1: T?, o2: T?): Int {
public override fun compare(o1: T, o2: T): Int {
return compareBy<T>(o1, o2, *functions)
}
@@ -79,7 +79,7 @@ private class Function2Comparator<T>(val compareFn: (T,T) -> Int): Comparator<T
return "Function2Comparator${compareFn}"
}
public override fun compare(a: T?, b: T?): Int {
public override fun compare(a: T, b: T): Int {
if (a === b) return 0
if (a == null) return - 1
if (b == null) return 1
@@ -11,7 +11,7 @@ import java.beans.*
inline fun propertyChangeListener(fn: (PropertyChangeEvent) -> Unit): PropertyChangeListener = FunctionPropertyChangeListener(fn)
private class FunctionPropertyChangeListener(val fn: (PropertyChangeEvent) -> Unit) : PropertyChangeListener {
public override fun propertyChange(e: PropertyChangeEvent?) {
public override fun propertyChange(e: PropertyChangeEvent) {
if (e != null) {
(fn)(e)
}
+1 -1
View File
@@ -410,7 +410,7 @@ Adds a newly created text node to an element which either already has an owner D
*/
fun Element.addText(text: String?, doc: Document? = null): Element {
if (text != null) {
val child = this.ownerDocument(doc).createTextNode(text)
val child = this.ownerDocument(doc).createTextNode(text)!!
this.appendChild(child)
}
return this