Pacane
12/09/2019, 8:49 PM@NotNull
annotations on fields/construction parameters, but the converter still makes everything nullableIlya Kirillov [JB]
12/09/2019, 10:10 PMPacane
12/09/2019, 10:12 PMIlya Kirillov [JB]
12/09/2019, 10:25 PMimport org.jetbrains.annotations.NotNull;
public class Test {
void Test(@NotNull String notNullParam) {}
}
generates:
class Test internal constructor(notNullParam: String)
Could you please provide me with reproducible example?Pacane
12/09/2019, 10:26 PMB.java
package com.bitboxusa.core.abstractions.eventbus;
import org.jetbrains.annotations.NotNull;
public class B {
@NotNull protected final Integer b;
B(@NotNull Integer b) {
this.b = b;
}
}
This is A.java
package com.bitboxusa.core.abstractions.eventbus;
import org.jetbrains.annotations.NotNull;
public abstract class A extends B {
public A(@NotNull Integer some) {
super(some);
}
}
I'm only converting A.java to Kotlin so farpackage com.bitboxusa.core.abstractions.eventbus
import org.jetbrains.annotations.NotNull
abstract class A(some: @NotNull Int?) : B(some!!)
Ilya Kirillov [JB]
12/09/2019, 10:46 PMabstract class A(some: Int) : B(some)
Settings -> Languages & Fraameworks -> Kotilin -> Use New Java to Kotlin Conversion
Pacane
12/09/2019, 10:47 PM