Title: Null Array Parameter is persisted as an Array containing a single element, which is null · Issue #466 · scijava/scijava-common · GitHub
Open Graph Title: Null Array Parameter is persisted as an Array containing a single element, which is null · Issue #466 · scijava/scijava-common
X Title: Null Array Parameter is persisted as an Array containing a single element, which is null · Issue #466 · scijava/scijava-common
Description: I have a command with a non-required array parameter: @Parameter(label = "Select Bvv Windows to synchronize", required = false) BvvHandle[] bvvhs; Before, when nothing was set, bvvhs was returned as a null object. Now, when bvvhs is not ...
Open Graph Description: I have a command with a non-required array parameter: @Parameter(label = "Select Bvv Windows to synchronize", required = false) BvvHandle[] bvvhs; Before, when nothing was set, bvvhs was returned a...
X Description: I have a command with a non-required array parameter: @Parameter(label = "Select Bvv Windows to synchronize", required = false) BvvHandle[] bvvhs; Before, when nothing was set, bvvhs was ...
Opengraph URL: https://github.com/scijava/scijava-common/issues/466
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Null Array Parameter is persisted as an Array containing a single element, which is null","articleBody":"\r\nI have a command with a non-required array parameter:\r\n\r\n```\r\n\t@Parameter(label = \"Select Bvv Windows to synchronize\", required = false)\r\n\tBvvHandle[] bvvhs;\r\n```\r\n\r\n\r\nBefore, when nothing was set, `bvvhs` was returned as a null object. Now, when `bvvhs` is not set, the parameter is set to an array of size 1, with the element being a null object.\r\n\r\nIt's a change of behaviour which breaks a few things in my code. It's probably manageable, but the current behaviour needs to be changed:\r\n\r\nreturn null is fine, returning an empty array is probably also fine, but returning a one-element array with null inside do not look good.\r\n\r\nFYI, I checked in the prefs how the parameter is remembered, and this is how it looks:\r\n\r\n\r\n\r\nI think it should be:\r\n\r\n\r\n\r\nRelated as mentioned by @ctrueden:\r\n\r\nhttps://github.com/scijava/scijava-common/issues/450\r\nhttps://github.com/scijava/scijava-common/commit/ce135b7c9e3197a87423e9ef0e8fc58f5d400387\r\n\r\nOriginal forum thread: \r\nhttps://forum.image.sc/t/change-of-behaviour-in-scijava-parameter-table-of-size-one-with-null-object-inside-instead-of-null-object/83625/2\r\n\r\n---\r\n\r\nIt does not look like a critical issue, but it might pop here and there","author":{"url":"https://github.com/NicoKiaru","@type":"Person","name":"NicoKiaru"},"datePublished":"2023-07-13T18:18:23.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/466/scijava-common/issues/466"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:b0a9b8e4-9fac-50b5-3a6c-ea2e7cf2782e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BBEE:96FA2:5E469:7EEE5:6969C588 |
| html-safe-nonce | d8b13ad34ef056336cba5dec2e6785f951ba21b55e4e9a83d8a54a395b4f0e76 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQkVFOjk2RkEyOjVFNDY5OjdFRUU1OjY5NjlDNTg4IiwidmlzaXRvcl9pZCI6IjI0MzYxMzM4NTQ2Nzg0Njc5NzYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 5dc55d0fd0ed5b1b89a688ce94f35127229cfde37868fd0c693326d723be639c |
| hovercard-subject-tag | issue:1803539064 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/scijava/scijava-common/466/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6f5e33d21027150a17cd7a1c68218139ba5552370f295c590d7c074b9e3250ea/scijava/scijava-common/issues/466 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6f5e33d21027150a17cd7a1c68218139ba5552370f295c590d7c074b9e3250ea/scijava/scijava-common/issues/466 |
| og:image:alt | I have a command with a non-required array parameter: @Parameter(label = "Select Bvv Windows to synchronize", required = false) BvvHandle[] bvvhs; Before, when nothing was set, bvvhs was returned a... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | NicoKiaru |
| hostname | github.com |
| expected-hostname | github.com |
| None | acedec8b5f975d9e3d494ddd8f949b0b8a0de59d393901e26f73df9dcba80056 |
| turbo-cache-control | no-preview |
| go-import | github.com/scijava/scijava-common git https://github.com/scijava/scijava-common.git |
| octolytics-dimension-user_id | 1262770 |
| octolytics-dimension-user_login | scijava |
| octolytics-dimension-repository_id | 3594497 |
| octolytics-dimension-repository_nwo | scijava/scijava-common |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3594497 |
| octolytics-dimension-repository_network_root_nwo | scijava/scijava-common |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 83c08c21cdda978090dc44364b71aa5bc6dcea79 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width