kirillrakhman
01/10/2017, 12:09 PMdsgryazin
01/10/2017, 12:40 PM@NonNull
- nullability contracts in java are broken too often. When I use Kotlin and it says that arguments are ok - I'm sure nullability is ok. Can't say that about java. Often you even don't understand that you call java and that's why I want special inspection.
I see two critical examples:
1. You override Java method. Today Kotlin plugin automatically makes ?
-arguments unless @NonNull
specified, but accidental T!
happens causing NPE.
2. Java method returns value. Kotlin automatically infers T!
and allows using it as nonnull
leading to NPE.
See, platform types too easy to use as nonnull
accidentally, by fault. And there is no help from lint, except "Function or property has platform type"
that doesn't cover all platform types usages.kefir
01/11/2017, 1:10 PMissue.png▾
ralf
01/11/2017, 1:32 PMScreen Shot 2017-01-11 at 2.29.50 PM.png▾
ralf
01/11/2017, 1:32 PMcrossinline
keyword causes this issue? The code is definitely executed
inline fun workerThread(crossinline block: () -> Unit) {
workerExecutor.execute { block() }
}
yole
01/11/2017, 1:33 PMuser
01/11/2017, 1:37 PMhttps://kotlinlang.slack.com/files/U3JBZ910W/F3QNKSQ06/_________________-1.png▾
orangy
alex.hart
01/11/2017, 2:50 PMadambl4
01/11/2017, 3:08 PM1.1-M04-release-Studio2.3-2
Kotlin plugin can't recognize
any 1.1
language feature on the latest Android Studio version. Is there someone with the same problem?nk
ralf
01/12/2017, 4:08 PMprivate val subjectText by lazy { BehaviorSubject.createDefault(currentSearch).toSerialized() }
Even if I add a break point inside the createDefault()
or toSerialized()
methods it doesn’t stop for the lazy expression, but it does stop for other calls 😞darrenatherton
01/12/2017, 8:46 PMralf
01/12/2017, 9:13 PMdarrenatherton
01/12/2017, 9:14 PMigor.wojda
01/13/2017, 6:02 AMralf
01/13/2017, 12:04 PMyawkat
01/15/2017, 10:51 AMorangy
yawkat
01/15/2017, 12:23 PMmasted
01/15/2017, 12:40 PMyawkat
01/15/2017, 12:45 PMorangy
masted
01/15/2017, 1:23 PMyawkat
01/15/2017, 1:24 PMyawkat
01/15/2017, 1:25 PMorangy
@file:JvmName(”VarInts”)
and still have top level extension functions, and good Java interoporangy
yawkat
01/15/2017, 1:34 PMorangy