You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using following Kotlin code to generate proxy (This will also generate Rx methods)
@ProxyGen
@VertxGen
interface JobService {
@Fluent
fun getCertain(jobId: Int, handler: Handler<AsyncResult<Job?>>): JobService
}
When I see generated Rx Code it is as follows.
public Single<Job> rxGetCertain(int jobId) {
return new io.vertx.reactivex.core.impl.AsyncResultSingle<Job>(handler -> {
getCertain(jobId, handler);
});
}
Issue:-
Unfortunately i am not able to use this in Kotlin as kotlin won't allow null values for non-null fields and it is throwing following exception.
java.lang.IllegalArgumentException: Parameter specified as non-null is null
How do i force Vertx CodeGen to generate return type as MayBe so that my code works without any issues in kotlin.
I am using following Kotlin code to generate proxy (This will also generate Rx methods)
Issue:-
Unfortunately i am not able to use this in Kotlin as kotlin won't allow null values for non-null fields and it is throwing following exception.
java.lang.IllegalArgumentException: Parameter specified as non-null is null
How do i force Vertx CodeGen to generate return type as MayBe so that my code works without any issues in kotlin.
Note: I have tried adding @nullable but no use
i have added Sample Project Here
https://github.com/c-nnooka/VertxCodeGenMayBe
The text was updated successfully, but these errors were encountered: