[JIRA] (JSSH-22) Consider returning null from Spring boolean converters

Scott Cantor (Jira) jira at shibboleth.atlassian.net
Tue Jan 24 14:32:33 UTC 2023


Scott Cantor ( https://shibboleth.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A5b78efc9-1379-42cc-a3f6-56c6ea3a0007 ) *created* an issue

Shibboleth Shared - Java ( https://shibboleth.atlassian.net/browse/JSSH?atlOrigin=eyJpIjoiNzhkODUwNzNkN2QzNDAyNzgzNmMyZGQxOWJiYWVmMmYiLCJwIjoiaiJ9 ) / Improvement ( https://shibboleth.atlassian.net/browse/JSSH-22?atlOrigin=eyJpIjoiNzhkODUwNzNkN2QzNDAyNzgzNmMyZGQxOWJiYWVmMmYiLCJwIjoiaiJ9 ) JSSH-22 ( https://shibboleth.atlassian.net/browse/JSSH-22?atlOrigin=eyJpIjoiNzhkODUwNzNkN2QzNDAyNzgzNmMyZGQxOWJiYWVmMmYiLCJwIjoiaiJ9 ) Consider returning null from Spring boolean converters ( https://shibboleth.atlassian.net/browse/JSSH-22?atlOrigin=eyJpIjoiNzhkODUwNzNkN2QzNDAyNzgzNmMyZGQxOWJiYWVmMmYiLCJwIjoiaiJ9 )

Issue Type: Improvement Assignee: Rod Widdowson ( https://shibboleth.atlassian.net/secure/ViewProfile.jspa?accountId=59fb32bbc24efb3c4ed3c977 ) Components: Spring Created: 24/Jan/23 9:32 AM Fix Versions: 9.0.0 Priority: Trivial Reporter: Scott Cantor ( https://shibboleth.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A5b78efc9-1379-42cc-a3f6-56c6ea3a0007 )

This will take some investigating, but I think we may be able to get rid of those occasional “this is being treated as false, watch out” warnings in the IdP by changing the String to Predicate converter to return null instead of a false. The conversion interface definitely allows for null returns, but I don’t know if that will result in the behavior we want. It seems like I tried that originally and ran into problems getting it to try all the possible conversions at the time.

The cases this shows up are situations where a constructor or property can handle both strings or lists of values and a Predicate, like the relying party override layer. The hope would be that it would treat an unexpected string value as a possible value to pass into the string or list constructor variant and stop treating it as an implicit false.

We’ve gotten around the problem using named arguments I think, and this was one of the reasons we had to do that.

( https://shibboleth.atlassian.net/browse/JSSH-22#add-comment?atlOrigin=eyJpIjoiNzhkODUwNzNkN2QzNDAyNzgzNmMyZGQxOWJiYWVmMmYiLCJwIjoiaiJ9 ) Add Comment ( https://shibboleth.atlassian.net/browse/JSSH-22#add-comment?atlOrigin=eyJpIjoiNzhkODUwNzNkN2QzNDAyNzgzNmMyZGQxOWJiYWVmMmYiLCJwIjoiaiJ9 )

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:01e0849 )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/commits/attachments/20230124/ab8caecd/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-static-comment-icon-9b663e86-f912-4f18-8f49-6fced630ecc9
Type: image/png
Size: 1084 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20230124/ab8caecd/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-avatar-b2375ed5-586c-4014-b61d-3cd827c1c079
Type: image/png
Size: 448 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20230124/ab8caecd/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-static-trivial-50a85dc4-691f-42d7-8646-5c56784218e7
Type: image/png
Size: 446 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20230124/ab8caecd/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-static-footer-desktop-logo-f3b50522-35ba-436d-bd1c-3af7377afbf7
Type: image/png
Size: 10805 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20230124/ab8caecd/attachment-0007.png>


More information about the commits mailing list