[JIRA] (JSSH-22) Consider returning null from Spring boolean converters
Rod Widdowson (Jira)
jira at shibboleth.atlassian.net
Wed Feb 1 13:23:59 UTC 2023
Rod Widdowson ( https://shibboleth.atlassian.net/secure/ViewProfile.jspa?accountId=59fb32bbc24efb3c4ed3c977 ) *commented* on JSSH-22 ( https://shibboleth.atlassian.net/browse/JSSH-22?atlOrigin=eyJpIjoiZTllZWY1YWEwNDBjNGNjNjg5OGY2YjdiYmFiNDk4YTYiLCJwIjoiaiJ9 )
Re: Consider returning null from Spring boolean converters ( https://shibboleth.atlassian.net/browse/JSSH-22?atlOrigin=eyJpIjoiZTllZWY1YWEwNDBjNGNjNjg5OGY2YjdiYmFiNDk4YTYiLCJwIjoiaiJ9 )
Sigh.
So what I thought would happen would be that the property handle would iterate over all the setters and all the converters and find some sort of best match.
So I wrote a really cool test to try this and it works right now (everything becomes a predicates FALSE ) Then I flipped the test to expected behavior and added null returning from the converter and …
Nothing. If the property isn’t “true” or “false” then *NONE* of the properties are set (specifically, the predicate setter is called with a null parameter).
This is ‘unfortunate’ and mirrors the initial comment
>
>
>
> It seems like I tried that originally and ran into problems getting it to
> try all the possible conversions at the time.
>
>
But I am also concerned that I may not have the test correct so I’ll assign this to Scott Cantor ( https://shibboleth.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A5b78efc9-1379-42cc-a3f6-56c6ea3a0007 ) and he can review my test before closing this as “Cannot do”.
Attached
StringBooleanToPredicateConverter.java ( https://shibboleth.atlassian.net/secure/attachment/10704/10704_StringBooleanToPredicateConverter.java )
Is my test version of the converter
( https://shibboleth.atlassian.net/browse/JSSH-22#add-comment?atlOrigin=eyJpIjoiZTllZWY1YWEwNDBjNGNjNjg5OGY2YjdiYmFiNDk4YTYiLCJwIjoiaiJ9 ) Add Comment ( https://shibboleth.atlassian.net/browse/JSSH-22#add-comment?atlOrigin=eyJpIjoiZTllZWY1YWEwNDBjNGNjNjg5OGY2YjdiYmFiNDk4YTYiLCJwIjoiaiJ9 )
Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100214- sha1:06410ea )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/commits/attachments/20230201/63bfcff1/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-static-comment-icon-b237dccc-2103-4d8d-8dfd-54c99f8c5357
Type: image/png
Size: 1084 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20230201/63bfcff1/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-avatar-d4481898-c169-4eb6-bed1-b784dac0a935
Type: image/png
Size: 448 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20230201/63bfcff1/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-static-link_attachment_7-aaf6eb36-f209-479a-bedf-f5027f598133
Type: image/gif
Size: 163 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20230201/63bfcff1/attachment-0001.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-static-footer-desktop-logo-0fed34c5-c6c8-463c-abca-be908f3656f0
Type: image/png
Size: 10805 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20230201/63bfcff1/attachment-0005.png>
More information about the commits
mailing list