-
Notifications
You must be signed in to change notification settings - Fork 162
docs: add Javadoc to mutation annotations #976
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
docs: add Javadoc to mutation annotations #976
Conversation
aeb8b51 to
a99703c
Compare
|
I am not completely sure regarding -0.0 handling for
But I am not sure if the underlying number generation logic can actually create -0.0 in the first place. |
You are right regarding the behavior of It might make sense to switch to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive Javadoc documentation to mutation annotation classes to improve their usability and discoverability. The documentation clarifies the purpose of each annotation, describes parameter behavior (inclusive bounds), and includes cross-references to related annotations.
Key changes:
- Added class-level Javadoc to all mutation annotations explaining their purpose
- Documented annotation parameters with details about inclusive bounds and special cases
- Added
@seetags to link related annotations (e.g., WithSize, WithLength, WithUtf8Length)
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| WithUtf8Length.java | Added Javadoc for min/max parameters describing UTF-8 encoding length bounds |
| WithSize.java | Added class-level Javadoc explaining List/Map size generation with cross-references |
| WithLength.java | Added class-level Javadoc explaining array length generation with cross-references |
| Positive.java | Added class-level Javadoc clarifying positive number generation (> 0) and NaN exclusion |
| NotNull.java | Added class-level Javadoc explaining non-null value generation behavior |
| NonPositive.java | Added class-level Javadoc clarifying non-positive number generation (<= 0) and NaN exclusion |
| NonNegative.java | Added class-level Javadoc clarifying non-negative number generation (>= 0) and NaN exclusion |
| Negative.java | Added class-level Javadoc clarifying negative number generation (< 0) excluding -0.0 and NaN |
| InRange.java | Added class-level Javadoc for integral range generation with cross-references and parameter docs |
| FloatInRange.java | Added class-level and parameter Javadoc including allowNaN documentation |
| Finite.java | Added class-level Javadoc explaining finite float/double generation (no NaN/Infinity) |
| DoubleInRange.java | Added class-level and parameter Javadoc including allowNaN documentation |
| Ascii.java | Added class-level Javadoc explaining ASCII string generation including control characters |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot! Looks good to me.
9e22eac to
4d3e556
Compare
|
Thanks for merging! And sorry for not having squashed the commits. Feel free to do that on merge (I wouldn't mind if my commits are not preserved as is), or let me know next time and I will do it. |
Ah, my bad. I was to trigger happy and didn't look at the individual commits.
Both is fine for me. I'm happy to merge multiple commits if they add value. |
Adds Javadoc to the mutation annotations to hopefully make them a bit easier to use.
Have marked this as Draft for now because I saw that there are other mutation annotation related PRs open, so it might make sense to wait for them to be merged first.