[JIRA] (JSSH-27) Implement an ensureId method to help with nullability annotation

Rod Widdowson (Jira) jira at shibboleth.atlassian.net
Thu May 4 15:16:21 UTC 2023


Rod Widdowson ( https://shibboleth.atlassian.net/secure/ViewProfile.jspa?accountId=59fb32bbc24efb3c4ed3c977 ) *commented* on JSSH-27 ( https://shibboleth.atlassian.net/browse/JSSH-27?atlOrigin=eyJpIjoiZDFmMzVlMTcwYjliNDdiMDk3NmFiMTE2NjZjM2E3ZjkiLCJwIjoiaiJ9 )

Re: Implement an ensureId method to help with nullability annotation ( https://shibboleth.atlassian.net/browse/JSSH-27?atlOrigin=eyJpIjoiZDFmMzVlMTcwYjliNDdiMDk3NmFiMTE2NjZjM2E3ZjkiLCJwIjoiaiJ9 )

I’m working through the IdP making use of this as needed

* I am not changing logging - logging can swallow nulls and making something crash needlessly is too much of a risk (plus the logging could help)
* I am not changing id usage in equals/hash/toString - there is no guarantee on component state
* I am adding it where we currently have defensive code (obvs)
* I am adding it in cases where null would break other contracts (e.g. as a key or value into a Map or as a value into a Collection - when these are implied or defined to not contain nulls)

This works pretty well.

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

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#100225- sha1:f83bc8f )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/commits/attachments/20230504/69ebfdef/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-avatar-337197a8-cf48-44a1-b019-93edb26b8a5d
Type: image/png
Size: 302 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20230504/69ebfdef/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-static-comment-icon-08398d7e-a214-4acc-b4c6-2283ebfc0106
Type: image/png
Size: 1084 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20230504/69ebfdef/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-static-footer-desktop-logo-2c3a6672-1957-42b4-84a7-b8cdc90f1bcf
Type: image/png
Size: 10805 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20230504/69ebfdef/attachment-0005.png>


More information about the commits mailing list