Skip to content

Conversation

@mocca102
Copy link
Contributor

Issue

  • position and options_limit default to zero due to type int

Fix

  • Change type from int to Integer which will default the values to null instead of zero
  • Add tests

@mocca102 mocca102 requested a review from a team June 17, 2025 12:47
@mocca102 mocca102 force-pushed the ci-4556-java-update-options_limit-and-position-types-to-integer branch from b8d0f96 to d3d4b1f Compare June 17, 2025 13:03
Copy link
Contributor

@stanlp1 stanlp1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

One comment. @mocca102 Can we add a new test that set these values as null, checksto make sure that these values are included in the serialized option?

assertEquals("test-alias", jsonOption1.get("value_alias"));
assertEquals("Test Option", jsonOption1.get("display_name"));
assertEquals(1, jsonOption1.get("position"));
assertEquals(Integer.valueOf(1), jsonOption1.get("position"));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a similar test to this where we set values to null, see if it gets set correctly?

@mocca102 mocca102 requested a review from stanlp1 June 25, 2025 16:18
Copy link
Contributor

@stanlp1 stanlp1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@stanlp1 stanlp1 merged commit e296553 into master Sep 16, 2025
4 checks passed
@stanlp1 stanlp1 deleted the ci-4556-java-update-options_limit-and-position-types-to-integer branch September 16, 2025 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants