-
Notifications
You must be signed in to change notification settings - Fork 359
findOrDefaultIfNull issue #701
Copy link
Copy link
Closed
Labels
bugYou've guessed it... this means a bug is reported.You've guessed it... this means a bug is reported.enhancementSomething we do have implemented already but needs improvement upon to the best of knowledge.Something we do have implemented already but needs improvement upon to the best of knowledge.
Metadata
Metadata
Assignees
Labels
bugYou've guessed it... this means a bug is reported.You've guessed it... this means a bug is reported.enhancementSomething we do have implemented already but needs improvement upon to the best of knowledge.Something we do have implemented already but needs improvement upon to the best of knowledge.
I really think this exported function is bugged… or at the very least incomplete with non-descriptive function naming...
Consider this abbreviated snippet:
… should probably just return from the function… instead it does a filter on the list with these conditions:
… and if I actually choose a default of something, say
'User'forfindOrDefaultIfNull, it returns this for this condition:… in other words the default is never done at all.
What, in human terms, is the function here supposed to really do? I understand it is supposed to filter but it doesn’t appear to be doing that anywhere e.g. the first line of the snippet will always set something, whether it be
falseor some other value.This issue is mainly targetted at @Zren since he did it at 7875f52 but anyone can pipe in to improve the understanding.
TIA