AbstractStringBuilder, StringBuilder and java.io.File annotated with nullable/notnull

This commit is contained in:
Andrey Breslav
2012-09-20 15:07:02 +04:00
parent dadc97d29f
commit 2abe2e581d
8 changed files with 460 additions and 12 deletions
@@ -75,7 +75,7 @@ fun join(x : Int, vararg a : String) : String {
for (s in a) {
b.append(s)
}
return b.toString()!!
return b.toString()
}
fun <T> joinG(x : Int, vararg a : T) : String {
@@ -83,7 +83,7 @@ fun <T> joinG(x : Int, vararg a : T) : String {
for (s in a) {
b.append(s)
}
return b.toString()!!
return b.toString()
}
fun <T> joinT(<!UNUSED_PARAMETER!>x<!> : Int, vararg <!UNUSED_PARAMETER!>a<!> : T) : T? {
@@ -52,7 +52,7 @@ fun main(args: Array<String>) {
System.out.println("Your numbers: " + prompt)
System.out.println("Enter your expression:")
val reader = BufferedReader(InputStreamReader(System.`in`))
val expr = StringBuilder(reader.readLine())
val expr = StringBuilder(reader.readLine()!!)
try {
val result = evaluate(expr, numbers)
if (result != 24)