This message was deleted.
# plugin-development
s
This message was deleted.
c
It returns a null value, which is
Any ?
- if it never returned (e.g. threw an exception),
Nothing
would be appropriate.
k
But wouldn't calling
get()
from the returned provider throw an exception, thereby justifying the use of
Nothing
?
o
The best option IMO would be to make it a method with a generic
T
, since you won't need to cast it when wiring to properties.
fun <T> ProviderFactory.absent(): Provider<T> = providers.provider { null }
1