You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "madhurlathi (via GitHub)" <gi...@apache.org> on 2025/09/14 07:36:52 UTC
[PR] [LANG-1769] Support lenient mode in FastDateFormat and FastDateParser like SimpleDateFormat [commons-lang]
madhurlathi opened a new pull request, #1447:
URL: https://github.com/apache/commons-lang/pull/1447
This PR extended `FastDateFormat` to support a strict (lenient) mode, following the same pattern as `SimpleDateFormat`:
Thanks @ppkarwasz for the direction.
- Added methods: `isLenient`, `setLenient` and `reset`.
- Throws an exception for invalid input data and lenient is false.
- Added tests for new scenarios and confirmed all existing and new test cases pass with `mvn`.
`reset()` method resets the object's state because the instance is cached and reused.
There is support for serialization and deserialization of the `FastDateParser`.
However, retaining the lenient value after serialization is not added. It currently resets to the default value.
This helps avoid unintentional exceptions when lenient is set to false. Users can explicitly set the value if needed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [LANG-1769] Support lenient mode in FastDateFormat and FastDateParser like SimpleDateFormat [commons-lang]
Posted by "garydgregory (via GitHub)" <gi...@apache.org>.
garydgregory commented on PR #1447:
URL: https://github.com/apache/commons-lang/pull/1447#issuecomment-3289467149
This class is being considered for depreciation in [LANG-1763](https://issues.apache.org/jira/browse/LANG-1763), so we shouldn't add more features to it until 1763 is resolved one way or another.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [LANG-1769] Support lenient mode in FastDateFormat and FastDateParser like SimpleDateFormat [commons-lang]
Posted by "madhurlathi (via GitHub)" <gi...@apache.org>.
madhurlathi commented on PR #1447:
URL: https://github.com/apache/commons-lang/pull/1447#issuecomment-3289561572
Ok. Thanks a lot.
Closing this PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [LANG-1769] Support lenient mode in FastDateFormat and FastDateParser like SimpleDateFormat [commons-lang]
Posted by "madhurlathi (via GitHub)" <gi...@apache.org>.
madhurlathi closed pull request #1447: [LANG-1769] Support lenient mode in FastDateFormat and FastDateParser like SimpleDateFormat
URL: https://github.com/apache/commons-lang/pull/1447
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org