Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Eugen Cepoi
    @EugenCepoi
    I tried it out and I think I see a fix to the problem
    If we look at the fields defined in MyEntity using Java Reflection (not scala) we can see that amount is actually a long : private final long com.owlike.genson.MyEntity.amount
    this makes us think that your converter is not needed
    value classes should work out of the box... but !
    in order to handle some corner cases in how scala is handling type erasure I had to use also Scalas reflection api
    in there the type of amount is being resolved as MyAmount
    the fault code is in ScalaBeanPropertyFactory.createAccessor
    ex: .map(new FieldAccessor(name, field, _, field.getDeclaringClass))
    the _ will he MyAmount
    one fix would be to check if the resolved type is a value type, if yes then extract the single param and use it's type
    Eugen Cepoi
    @EugenCepoi
    are you interested in working on a fix for this? If so I can give you more pointers/help
    otherwise I might do it my self but I am pretty busy so not sure when... :/
    @glidester
    Eugen Cepoi
    @EugenCepoi
    ok I got a fix for it, will push it to master in a moment
    please try it out and let me know how it works before I do a new release
    glidester
    @glidester
    Wow, thanks @EugenCepoi that is a quick turn around! I'll take a look and let you know. Cheers
    glidester
    @glidester
    Yes all looks good from here, works like a charm :smile: Many thanks!
    Eugen Cepoi
    @EugenCepoi
    great, I'll try to do a release sometime next week
    Marc Hermans
    @OrionDevelopment
    Hello i was wondering if there was any Progress on circular referencing?
    Eugen Cepoi
    @EugenCepoi
    Hi, sadly no. I am busy with other work and have less time to work on Genson lately. If people are interested in contributing, this would be more than welcome and I could try to find some time to help with that.
    sooraj20890
    @sooraj20890
    hey guys
    have a question regarding gensonbundle
    Eugen Cepoi
    @EugenCepoi
    hi, sure what's your question?
    sooraj20890
    @sooraj20890
    is the easiest way to create java 8 date converters is to create converters for each of localdate,localdatetime,zoneddatetime...etc and add them to a user defined bundle ?
    Eugen Cepoi
    @EugenCepoi
    It depends if you want to contribute them to Genson or not
    sooraj20890
    @sooraj20890
    am starting with doing them in my local and then iterate through it to fine tune it
    Eugen Cepoi
    @EugenCepoi
    ok, so the simplest would be to have a fresh project that depends on Genson, create a new bundle say JavaTimeBundle or something like that, make all your converters as part of this bundle and register them in the bundle
    a bit like what is done for the jodatime bundle in genson
    sooraj20890
    @sooraj20890
    from what i see its common for joda vs java time converters...you need two methods that are to be overridden like serialize and deserialize right ?
    Eugen Cepoi
    @EugenCepoi
    yep
    sooraj20890
    @sooraj20890
    okay got it..thanks
    Eugen Cepoi
    @EugenCepoi
    you basically implement Converter<YourType> and implement the inherited methods
    sooraj20890
    @sooraj20890
    yup thats it
    i got an outofmemory error while storing these types in my cache
    java time types
    Eugen Cepoi
    @EugenCepoi
    oh really
    that's surprising
    sooraj20890
    @sooraj20890
    because of lack of serializers and deserailizers
    anyways thanks for your advice
    sooraj20890
    @sooraj20890
    hi guys
    anybody here ?
    @EugenCepoi you there ?
    sooraj20890
    @sooraj20890
    okay my question is regarding genson joda time bundle
    whats the point of having makeLocalDateTimeConverter and methods like it which returns static
    can we just new and describe each converter in seperate classes
    Eugen Cepoi
    @EugenCepoi
    @sooraj20890 yes this would be entirely possible. Does the current implementation create any problem?
    sooraj20890
    @sooraj20890
    no..i just wanna keep it simple for reading
    Eugen Cepoi
    @EugenCepoi
    you can do it however you want in your module as long as it works :)
    sooraj20890
    @sooraj20890
    so even though i intend to submit for integrating with your genson git....i can have design different from genson joda bundle ?
    Eugen Cepoi
    @EugenCepoi
    If it's for new code yes sure. You just need to make sure the code is clean and tested. I will anyway review any PR submitted and comment on it if I have anything to say.