-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getOrElseGet() with provider as parameter for Property/Provider #10520
Comments
Do you have a little more detail on where/how |
Sure. If the |
OK, in that case, could you just do:
If targetTests is set explicitly, then that value is used. |
Have you looked at |
@big-guy I tried it before and with:
The second line overrides a default value even if
@adammurdoch Yes, that's exactly what I needed, thanks. I've been looking for that, but maybe my IDE has an earlier Gradle version set, so I missed it. |
Ok, I missed it as it is named |
Expected Behavior
There are cases where it is handy to return another provider if the current one is empty.
Current Behavior
Without that it is needed to use
ifPresent()
:Similar approach is used in
java.util.Optional
The text was updated successfully, but these errors were encountered: