Fixed bugs in Kotlin Android Lint CleanupDetector

#KT-14780 Fixed
#KT-14677 Fixed

(cherry picked from commit f591b4958e4a836d37d70c2ad8ff15e626c6342a)
This commit is contained in:
Vyacheslav Gerasimov
2017-01-24 13:27:00 +03:00
parent 68b223211c
commit d0f1b81bfa
7 changed files with 307 additions and 126 deletions
+5
View File
@@ -66,4 +66,9 @@ class SharedPrefsText(context: Context) : Activity() {
val editor = preferences.<warning descr="`SharedPreferences.edit()` without a corresponding `commit()` or `apply()` call"><warning descr="`SharedPreferences.edit()` without a corresponding `commit()` or `apply()` call">edit()</warning></warning>
editor.putString("foo", "bar")
}
fun testResultOfCommit() {
val r1 = PreferenceManager.getDefaultSharedPreferences(this).edit().putString("wat", "wat").commit()
val r2 = PreferenceManager.getDefaultSharedPreferences(this).edit().putString("wat", "wat").commit().toString()
}
}