-
Notifications
You must be signed in to change notification settings - Fork 164
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
Add Literals.getLabel method that accepts Optional input value #688
Comments
in the implementation of getLabel(), it is overloaded.
Is this issue fixed, since getLabel can now handle null values also? |
@raghav17083 not really - this issue is about having a This:
won't work right now, because the result of the It's a fairly minor thing but having this option will make for slightly cleaner and easier to read code when using these functions. |
So, does this mean that we just have to overload the getLabel() method to account for an 'Optional' call? |
Signed-off-by: SakshiSaini17092 <sakshi17092@iiitd.ac.in>
Yes, exactly |
@SakshiSaini17092 thanks for the pull request. Are you and @raghav17083 working together on this? |
Yes! |
Signed-off-by: SakshiSaini17092 <sakshi17092@iiitd.ac.in>
Literals.getLabel
only accepts actualValue
objects (with a fallback when the Value is null or not a Literal).In combination with, for example,
Models.object()
this leads to slightly convulated code:If
Literals.getLabel
also accepted an Optional value directly, we could do this instead:The text was updated successfully, but these errors were encountered: