nayanjyoti
08/09/2017, 12:39 PMdata class PayUPaymentTransaction(var mode : String) {
val status by lazy {
if (mode.equals("CC", true) ) {
SUCCESS
} else {
FAILURE
}
}
}
The mode is injected by the framework that binds the request with this object. Now whenever I am setting the status field to another non-nullable data object in this case, I am getting a null pointer exception, which means that the mode is null, but I did check that the mode is definitely injected by the framework while request binding.
Can anyone give me any idea what am I doing wrong?