AndroidDeveloperLB
AndroidDeveloperLB
Request: add inspection to save the result of Cursor.getColumnIndex , especially when done in a loop
Requested here too: https://issuetracker.google.com/issues/264071290 Also, when offering a name, try to offer multiple options based on what's given into getColumnIndex . For example, if I use: val contactRowId = cursor.getString(cursor.getColumnIndex(SomeTable.COLUMN_NAME_CONTACT_ROW_ID))...
For example: ``` fun foo(someInt:Int?){ val temp=someInt!!.toString() ... } ``` This means that the parameter is actually supposed to be non-null, because it would cause a crash otherwise. This also...
This is for both Java and Kotlin. Such a code can lead to bugs easily in case the order of the enum values change, or items get removed/replaced.
Because then it causes a crash of this form: ``` RuntimeException: Cannot create an instance of class ... ... IllegalAccessException: java.lang.Class is not accessible from java.lang.Class ``` Also requested on...
If in all calls of a function "foo", we call it from the UI-thread, it could suggest us to add the UiThread annotation. Same for WorkerThread. If it's mixed, suggest...
When Android Studio converts from Java to Kotlin, it often converts numbers that were supposed to be of colors. So, it creates something like: ``` var someColor = -0x555556 ```...
If all the functions/classes in the entire project that use a function/field that's annotated with one of these are in Kotlin, such annotations can be removed. There should also be...
Suppose you have a class : ``` open class Foo{ @UiThread open fun onBindView(view: View) { } } ``` Each class that extends it, the annotation should be added to...
This is to avoid some inspections that require much more work than just replacing with short text, such as here: https://github.com/Miha-x64/Mikes_IDEA_extensions/issues/20
Often when I convert from Java to Kotlin, I see something like this: ``` foo((value as Boolean?)!!) ``` Instead, it should be like this: ``` foo(value as Boolean) ``` If...