jakartaee / jakartaee/mail-api
CompactFormatter support width of one for alternate form
- Dominant language
- Java
- Stars
- 285
- Forks
- 109
- Avg merge
- 15h 19m
- Merged PRs (30d)
- 1
Description
The CompactFormatter alternate forms 7$, 8$, 12$, and 13$ allow patterns that specify a width of 1. Since this arguments are a join of two parameters it doesn't really make sense to specify any width value less than 2.
Need to add tests and determine the best behavior for width of one. Also need to test for subclasses that return empty strings in the format methods.
Here are the options:
- Add tests to enforce current behavior and make no changes to the code.
- Add tests and ensure the width of one just acts like width of 2.
- Add tests and ensure the width of one returns a single space if both left and right are empty.
- Add tests and ensure the width of one returns the fence and padding to the left or right of the fence based on the justify formatter flag.
- Add test and ensure the width of one throws an exception like width of zero does.
Contributor guide
Assessment
This issue has not been assessed yet.