Skip to content
This repository was 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

@lucaspouzac

Description

@lucaspouzac

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions