[JIRA] (MDA-258) Stage classes should only have 0-arg constructors
Ian Young (Jira)
jira at shibboleth.atlassian.net
Wed Feb 1 10:56:57 UTC 2023
Ian Young ( https://shibboleth.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3Ae127cb03-43ed-473d-b6ba-592949cb4be8 ) *commented* on MDA-258 ( https://shibboleth.atlassian.net/browse/MDA-258?atlOrigin=eyJpIjoiOWIwYTZmYzBlMWIyNDRhOWFkNzg2MTkyYzhmNGUyNjEiLCJwIjoiaiJ9 )
Re: Stage classes should only have 0-arg constructors ( https://shibboleth.atlassian.net/browse/MDA-258?atlOrigin=eyJpIjoiOWIwYTZmYzBlMWIyNDRhOWFkNzg2MTkyYzhmNGUyNjEiLCJwIjoiaiJ9 )
I’m trying to recall the original reasoning behind this. Part of it was certainly consistency (most Stages are like this, so all of them should be) but I think that original push originally came from the IdP and the business with constructor names being a little weird in Spring, for which we now use a custom annotation and may also need to use the javac -parameters longer term.
It would in many ways be nice to move in the opposite direction, towards using constructor arguments as much as possible so that more fields can be final. This would help the compiler and the nullability analyser out. Stages are however all (by definition), identifiable components and that mandates a mutable id field… so we can never fully avoid properties.
( https://shibboleth.atlassian.net/browse/MDA-258#add-comment?atlOrigin=eyJpIjoiOWIwYTZmYzBlMWIyNDRhOWFkNzg2MTkyYzhmNGUyNjEiLCJwIjoiaiJ9 ) Add Comment ( https://shibboleth.atlassian.net/browse/MDA-258#add-comment?atlOrigin=eyJpIjoiOWIwYTZmYzBlMWIyNDRhOWFkNzg2MTkyYzhmNGUyNjEiLCJwIjoiaiJ9 )
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/260965ae/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-avatar-725d60fc-e41b-480f-b5d4-21cfb75eb37b
Type: image/png
Size: 457 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20230201/260965ae/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-static-comment-icon-dc2f5e6d-dd76-4898-b6ed-0b89f439b677
Type: image/png
Size: 1084 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20230201/260965ae/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-static-footer-desktop-logo-31b75d8e-f536-4e44-80cd-e966203ea157
Type: image/png
Size: 10805 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20230201/260965ae/attachment-0005.png>
More information about the commits
mailing list