You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Jagdish-Singh-Bisht (via GitHub)" <gi...@apache.org> on 2025/12/29 07:15:31 UTC
[PR] LANG-1806: Allow floating-point suffixes in NumberUtils.isParsable [commons-lang]
Jagdish-Singh-Bisht opened a new pull request, #1546:
URL: https://github.com/apache/commons-lang/pull/1546
This PR addresses LANG-1806 as a small follow-up to LANG-1695.
NumberUtils.isParsable currently rejects strings such as "1.f" and "1.d", even though Float.parseFloat("1.f") and Double.parseDouble(1.d") succeed.
The test suite already contained TODOs for these cases, this change uncomments those assertions and updates the parsing logic to allow floating-point suffixes (f/F/d/D) only when they appear as the final character.
The change is intentionally minimal and doesn not affect other numeric formats.
--
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-1806: Allow floating-point suffixes in NumberUtils.isParsable [commons-lang]
Posted by "Jagdish-Singh-Bisht (via GitHub)" <gi...@apache.org>.
Jagdish-Singh-Bisht commented on PR #1546:
URL: https://github.com/apache/commons-lang/pull/1546#issuecomment-3732225468
I have pushed the updated implementation that fully supports scientific notation with float/double suffixes.
Please let me know if anything else is 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-1806: Allow floating-point suffixes in NumberUtils.isParsable [commons-lang]
Posted by "garydgregory (via GitHub)" <gi...@apache.org>.
garydgregory closed pull request #1546: LANG-1806: Allow floating-point suffixes in NumberUtils.isParsable
URL: https://github.com/apache/commons-lang/pull/1546
--
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-1806: Allow floating-point suffixes in NumberUtils.isParsable [commons-lang]
Posted by "garydgregory (via GitHub)" <gi...@apache.org>.
garydgregory commented on PR #1546:
URL: https://github.com/apache/commons-lang/pull/1546#issuecomment-3706962879
@Jagdish-Singh-Bisht
Still -1: I have the same comment as before: We don't need to have a special case for this one kind of float since we know it doesn't work for numbers like 1.2e-5d and 1.2e-5f. Fix it all here please.
--
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-1806: Allow floating-point suffixes in NumberUtils.isParsable [commons-lang]
Posted by "Jagdish-Singh-Bisht (via GitHub)" <gi...@apache.org>.
Jagdish-Singh-Bisht commented on PR #1546:
URL: https://github.com/apache/commons-lang/pull/1546#issuecomment-3706670220
Thanks for the review and guidance.
I have rebased on the latest master, cleaned up formatting, and verified the build with mvn test.
This PR intentionally limits the scope to suffix-only cases(2.f, 2.d) as a minimal follow-up to LANG-1695.
The cases (1.2e-5f, 1.2e-5d) remain as TODOs added on master, since they would require additional exponent-parsing logic
and may be better addressed separately.
Please let me know if you'd prefer those cases to be handled in 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-1806: Allow floating-point suffixes in NumberUtils.isParsable [commons-lang]
Posted by "garydgregory (via GitHub)" <gi...@apache.org>.
garydgregory commented on PR #1546:
URL: https://github.com/apache/commons-lang/pull/1546#issuecomment-3749465753
Closing: No reply. Implemented in git master with https://github.com/apache/commons-lang/pull/1560
--
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-1806: Allow floating-point suffixes in NumberUtils.isParsable [commons-lang]
Posted by "Jagdish-Singh-Bisht (via GitHub)" <gi...@apache.org>.
Jagdish-Singh-Bisht commented on PR #1546:
URL: https://github.com/apache/commons-lang/pull/1546#issuecomment-3698270034
Thanks for the review.
Understood regarding the scientific notation cases (1.2e-5d / 1.2e-5f).
I'll rebase on current master, address those cases, clean-up formatting, and confirm mvn test before updating the 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