[JIRA] (JSSH-5) ServiceableComponent should implement AutoClose
Rod Widdowson (Jira)
jira at shibboleth.atlassian.net
Thu Nov 17 19:24:25 UTC 2022
Rod Widdowson ( https://shibboleth.atlassian.net/secure/ViewProfile.jspa?accountId=59fb32bbc24efb3c4ed3c977 ) *commented* on JSSH-5 ( https://shibboleth.atlassian.net/browse/JSSH-5?atlOrigin=eyJpIjoiOTA3N2U0YTExNWZhNDk4YjkwMzUxYTJiY2U3NDM3NjEiLCJwIjoiaiJ9 )
Re: ServiceableComponent should implement AutoClose ( https://shibboleth.atlassian.net/browse/JSSH-5?atlOrigin=eyJpIjoiOTA3N2U0YTExNWZhNDk4YjkwMzUxYTJiY2U3NDM3NjEiLCJwIjoiaiJ9 )
>
>
>
> Maybe this was a bridge too far?
>
>
Potentially, but I am heavily swayed by the simplification that this makes in our code.
I don’t really buy the spring singleton analogy. The fact that spring is involved is an implementation detail at this level. All that the programmer needs to know is that once they get hold of one of these things you must close them. The weird thing is that these are stateless (and most closeable objects have state) but if you had a BufferedIoSteam (for instance) that was stateless but took a context instead, would you decide that it should not implement close?
I am also not certain that I care about tests. Would you expect the tests for a BufferedIoStream to use a close?
but I’m not wedded to this. I can certain see that the analogy feels weird and that I may have been overseduced by the code simplification and the fact that it becomes harder to do the wrong thing.
Chat tomorrow maybe?
( https://shibboleth.atlassian.net/browse/JSSH-5#add-comment?atlOrigin=eyJpIjoiOTA3N2U0YTExNWZhNDk4YjkwMzUxYTJiY2U3NDM3NjEiLCJwIjoiaiJ9 ) Add Comment ( https://shibboleth.atlassian.net/browse/JSSH-5#add-comment?atlOrigin=eyJpIjoiOTA3N2U0YTExNWZhNDk4YjkwMzUxYTJiY2U3NDM3NjEiLCJwIjoiaiJ9 )
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#100210- sha1:9b34d7c )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/commits/attachments/20221117/2db66e29/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-static-comment-icon-bc89a569-2cd2-4991-93ce-b66ab5e6ca8a
Type: image/png
Size: 1084 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20221117/2db66e29/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-static-footer-desktop-logo-4d4b4087-109c-409e-b2c2-2d7948b76275
Type: image/png
Size: 10805 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20221117/2db66e29/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-avatar-7bf10f96-6714-4ae3-b627-9321a6f20376
Type: image/png
Size: 468 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20221117/2db66e29/attachment-0005.png>
More information about the commits
mailing list