-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Support BigInteger
and BigDecimal
creators in StdValueInstantiator
#2215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
First of all, thank you for checking existing issues to see if there was previous work (there isn't AFAIK). The only concern I have is regarding extension of auto-detection, and whether it is something that would be best supported by figuring out an even more general extension point for allowing single-argument auto-detected constructors (and factory methods -- currently only hard-coded But for 2.10, we could start by allowing One practical concern is that I would prefer not to add yet more |
I think a more general extension point is definitely worth discussion. In trying to work around this, I have been trying for the last couple of days to define an extension that I can add to my I understand the concern about adding creators to |
Another thing I'll add as a note is the problem wrt But technically speaking it seems quite doable to just add new overload for In fact I'll tag this as "new contributor friendly"; if anyone wants to take a look. |
@cowtowncoder Hi! if you haven't picked it up yet, i would work on this |
@verkhovin I have not, so you are welcome to try it! |
Implementation contributed by @upsidedownsmile, just merged. |
BigInteger
and BigDecimal
creators in StdValueInstantiator
Uh oh!
There was an error while loading. Please reload this page.
Currently using 2.9.6; have searched and don't see any planned changes in this area.
Basically, I would like this test to pass by default:
the same way that this one does:
Currently,
StdValueInstantiator
does not supportBigDecimal
(orBigInteger
) at all. I would like to add support forBigDecimal
creators tocreateFromDouble
,createFromLong
, andcreateFromInt
(andBigInteger
creators tocreateFromLong
andcreateFromInt
) inStdValueInstantiator
as widening conversions, the same way thatcreateFromInt
supports using long creators as a widening conversion.The text was updated successfully, but these errors were encountered: