GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Null Array Parameter is persisted as an Array containing a single element, which is null · Issue #466 · scijava/scijava-common

Null Array Parameter is persisted as an Array containing a single element, which is null #466

New issue
Copy link
New issue
Copy link
Open
Open
Null Array Parameter is persisted as an Array containing a single element, which is null#466
Copy link

Description

@NicoKiaru
NicoKiaru
opened on Jul 13, 2023
Issue body actions

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 set, the parameter is set to an array of size 1, with the element being a null object.

It'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:

return null is fine, returning an empty array is probably also fine, but returning a one-element array with null inside do not look good.

FYI, I checked in the prefs how the parameter is remembered, and this is how it looks:

image

I think it should be:

image

Related as mentioned by @ctrueden:

#450
ce135b7

Original forum thread:
https://forum.image.sc/t/change-of-behaviour-in-scijava-parameter-table-of-size-one-with-null-object-inside-instead-of-null-object/83625/2


It does not look like a critical issue, but it might pop here and there

Activity

  1. imagesc-bot commented on Jul 13, 2023

    @imagesc-bot
    imagesc-bot
    on Jul 13, 2023
    More actions

    This issue has been mentioned on Image.sc Forum. There might be relevant details there:

    https://forum.image.sc/t/change-of-behaviour-in-scijava-parameter-table-of-size-one-with-null-object-inside-instead-of-null-object/83625/4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.