You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tamaya.apache.org by William Lieurance <wi...@namikoda.com> on 2018/02/04 22:22:04 UTC

BigInteger hex conversion

Hi devs,

I noticed the other day that the BigInteger converter is doing its own parsing of hexadecimal strings at https://github.com/apache/incubator-tamaya/blob/db56ee2264f79bb939cb4117c26d3d48d618f1d4/code/core/src/main/java/org/apache/tamaya/core/internal/converters/BigIntegerConverter.java#L57.  I'm pretty sure it's not working for most large number cases, including a few in the docs for that class like 0xFFFFAC. Before I open another jira ticket though, can you tell me why we're reimplementing hex string parsing instead of using BigInteger("somehexstring", 16)? It's cool if that's an oversight but I want to make sure I'm not missing some subtle use case.

Thanks!
William

Sent from a tiny keyboard


Re: BigInteger hex conversion

Posted by "Oliver B. Fischer" <o....@swe-blog.net>.
I can't remember why we did it. Maybe Anatole can help with an answer?


Am 04.02.18 um 23:22 schrieb William Lieurance:
> Hi devs,
>
> I noticed the other day that the BigInteger converter is doing its own parsing of hexadecimal strings at https://github.com/apache/incubator-tamaya/blob/db56ee2264f79bb939cb4117c26d3d48d618f1d4/code/core/src/main/java/org/apache/tamaya/core/internal/converters/BigIntegerConverter.java#L57.  I'm pretty sure it's not working for most large number cases, including a few in the docs for that class like 0xFFFFAC. Before I open another jira ticket though, can you tell me why we're reimplementing hex string parsing instead of using BigInteger("somehexstring", 16)? It's cool if that's an oversight but I want to make sure I'm not missing some subtle use case.
>
> Thanks!
> William
>
> Sent from a tiny keyboard
>
>

-- 
N Oliver B. Fischer
A Schönhauser Allee 64, 10437 Berlin, Deutschland/Germany
P +49 30 44793251
M +49 178 7903538
E o.b.fischer@swe-blog.net
S oliver.b.fischer
J oliver.b.fischer@jabber.org
X http://xing.to/obf