Skip to content
This repository has been archived by the owner on Nov 5, 2019. It is now read-only.

Revert back expansion of NON_EMPTY handling (Jackson 2.7.0) #63

Closed
lucaspouzac opened this issue Jan 15, 2016 · 1 comment · Fixed by #64
Closed

Revert back expansion of NON_EMPTY handling (Jackson 2.7.0) #63

lucaspouzac opened this issue Jan 15, 2016 · 1 comment · Fixed by #64
Milestone

Comments

@lucaspouzac
Copy link

Hi,

Revert back was not processed on afterburner module.

Exemple on BooleanFieldPropertyWriter

    public BooleanFieldPropertyWriter(BeanPropertyWriter src, BeanPropertyAccessor acc, int index,
            JsonSerializer<Object> ser) {
        super(src, acc, index, ser);

        if (MARKER_FOR_EMPTY == _suppressableValue) {
            _suppressableBoolean = false;
            _suppressableSet = true;
        } else if (_suppressableValue instanceof Boolean) {
           ...
        }

    public final void serializeAsElement(Object bean, JsonGenerator gen, SerializerProvider prov) throws Exception
    { 
        ...
        if (!_suppressableSet || _suppressableBoolean != value) {
            gen.writeBoolean(value);
        } else { 
           ...
        }
    }

6 classes must be update :

  • BooleanFieldPropertyWriter.java
  • BooleanMethodPropertyWriter.java
  • IntFieldPropertyWriter.java
  • IntMethodPropertyWriter.java
  • LongFieldPropertyWriter.java
  • LongMethodPropertyWriter.java

Could you correct this bug and release a patch ?

Thanks

@cowtowncoder
Copy link
Member

Ah. Yes, you are right, I forgot to follow up on this side. Would be happy to merge this.

One thing I need first is the Contributor License Agreement (https:/FasterXML/jackson/blob/master/contributor-agreement.pdf). It is the only piece of process fortunately, but we need one filled before merging in the first contribution; after that it's good for all other Jackson contributions.
Usually developers print it, fill + sign, scan and email to info at fasterxml dot com.

Apologies for the hassle. I will merge the contribution as soon as I get CLA.

cowtowncoder added a commit that referenced this issue Jan 17, 2016
Fix #63: Revert back expansion of NON_EMPTY handling (Jackson 2.7.x)
@cowtowncoder cowtowncoder added this to the 2.2.1 milestone Jan 17, 2016
cowtowncoder added a commit that referenced this issue Jan 17, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants