[JIRA] (MDA-271) Refactor SimpleCommandLine to avoid JVM exit, correctly handle context lifetime

Ian Young (Jira) jira at shibboleth.atlassian.net
Wed Oct 19 09:44:04 UTC 2022


Ian Young ( https://shibboleth.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3Ae127cb03-43ed-473d-b6ba-592949cb4be8 ) *created* an issue

Metadata Aggregator ( https://shibboleth.atlassian.net/browse/MDA?atlOrigin=eyJpIjoiN2VmZjMxMTEzNWRkNDM5MzliYzY5NTE4YTI5MGNmZDUiLCJwIjoiaiJ9 ) / Improvement ( https://shibboleth.atlassian.net/browse/MDA-271?atlOrigin=eyJpIjoiN2VmZjMxMTEzNWRkNDM5MzliYzY5NTE4YTI5MGNmZDUiLCJwIjoiaiJ9 ) MDA-271 ( https://shibboleth.atlassian.net/browse/MDA-271?atlOrigin=eyJpIjoiN2VmZjMxMTEzNWRkNDM5MzliYzY5NTE4YTI5MGNmZDUiLCJwIjoiaiJ9 ) Refactor SimpleCommandLine to avoid JVM exit, correctly handle context lifetime ( https://shibboleth.atlassian.net/browse/MDA-271?atlOrigin=eyJpIjoiN2VmZjMxMTEzNWRkNDM5MzliYzY5NTE4YTI5MGNmZDUiLCJwIjoiaiJ9 )

Issue Type: Improvement Affects Versions: 0.9.2 Assignee: Ian Young ( https://shibboleth.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3Ae127cb03-43ed-473d-b6ba-592949cb4be8 ) Components: Command Line Created: 19/Oct/22 5:44 AM Fix Versions: 0.10.0 Priority: Trivial Reporter: Ian Young ( https://shibboleth.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3Ae127cb03-43ed-473d-b6ba-592949cb4be8 )

SimpleCommandLine is a very old piece of code and should be modernised to:

* use try-with-resources in constructing its Spring context
* use exceptions rather than System.exit for, er, exceptional exits
* no longer use a VM shutdown hook to clean up the context, instead relying on the try-with-resources

This won’t change the behaviour from the user perspective at all, but will make the code a lot more readable and maintainable.

( https://shibboleth.atlassian.net/browse/MDA-271#add-comment?atlOrigin=eyJpIjoiN2VmZjMxMTEzNWRkNDM5MzliYzY5NTE4YTI5MGNmZDUiLCJwIjoiaiJ9 ) Add Comment ( https://shibboleth.atlassian.net/browse/MDA-271#add-comment?atlOrigin=eyJpIjoiN2VmZjMxMTEzNWRkNDM5MzliYzY5NTE4YTI5MGNmZDUiLCJwIjoiaiJ9 )

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#100209- sha1:5f5cf47 )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/commits/attachments/20221019/ee29bbdf/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-static-comment-icon-f16de0c3-258b-489b-9426-a7dc7f1250ca
Type: image/png
Size: 1084 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20221019/ee29bbdf/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-avatar-039ff29a-f2ec-42ef-80bf-c9eeef1b2ae8
Type: image/png
Size: 457 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20221019/ee29bbdf/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-static-trivial-77c930fd-124f-4c63-b382-3857d0297579
Type: image/png
Size: 563 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20221019/ee29bbdf/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-static-footer-desktop-logo-df7af179-d4ca-4fc7-9614-8a40ffbfbf36
Type: image/png
Size: 10805 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20221019/ee29bbdf/attachment-0007.png>


More information about the commits mailing list