I am not convinced this belong in Lang. Maybe in a Math module? Maybe in
Text?

Gary

On Wed, Mar 3, 2021, 19:29 GitBox <g...@apache.org> wrote:

>
> aherbert commented on pull request #727:
> URL:
> https://github.com/apache/commons-lang/pull/727#issuecomment-790185530
>
>
>    Is the intention that this should match `isCreateable(String)` for all
> valid hex numbers and return `true` for all hex cases where a `Number` is
> returned from `createNumber(String)`?
>    ```java
>    public static boolean isCreatable(final String str)
>    public static Number createNumber(final String str)
>    ```
>    If so then you should support the `#` character (and all the other hex
> prefixes) and update the javadoc to reflect the intention.
>
>    I would then update the test to use all the hex cases from the tests
> for `createNumber` and `isCreateable` to ensure it returns `true` when
> those methods succeed.
>
>    Currently your test only covers a range of `int` and `long` values, no
> hex variants and does not specify whether BigInteger values are also `true`.
>
>    It will also fail on valid hex numbers such as `0x1L`.
>
>
>
>
> ----------------------------------------------------------------
> 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.
>
> For queries about this service, please contact Infrastructure at:
> us...@infra.apache.org
>
>
>

Reply via email to