Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

empty list value for Schedule fields is undefined #407

Conversation

njr-11
Copy link
Contributor

@njr-11 njr-11 commented Jan 2, 2024

The Schedule annotation does not define what to do when fields (such as months or hours) are assigned a value of empty list.

One option could be for empty to indicate that it should run at no hours or no months, but that would be pointless to use the annotation at all in that case.

Or empty could raise an error.

Or another option would be for empty to indicate that the field is disregarded entirely, effectively being able to run at all of the values. This seems the most useful because it could be more convenient than listing all of the possible values.

The pull updates the JavaDoc to define the behavior as the latter. Also, I noticed the JavaDoc for these methods was difficult to read with everything in a single paragraph, so I split it up into paragraphs.

@njr-11 njr-11 added this to the 3.1 milestone Jan 2, 2024
Copy link
Contributor

@KyleAure KyleAure left a comment

Choose a reason for hiding this comment

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

I agree that using an empty list to disregard is the correct choice.

@njr-11 njr-11 merged commit b0ff74c into jakartaee:main Jan 8, 2024
3 checks passed
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.

2 participants