johnzon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Falb (JIRA)" <>
Subject [jira] [Created] (JOHNZON-199) JohnzonIgnore#minVersion logic is negated?
Date Fri, 08 Feb 2019 11:00:00 GMT
Alexander Falb created JOHNZON-199:

             Summary: JohnzonIgnore#minVersion logic is negated?
                 Key: JOHNZON-199
             Project: Johnzon
          Issue Type: Bug
    Affects Versions: 1.1.10
            Reporter: Alexander Falb

When a field is annotated with {{@JohnzonIgnore(minVersion = X)}} and a json-string is written
via {{Mapper}}, the field is only included when the mapper is configured with {{.setVersion(Y)}},
where Y < X}.
According to the documentation of {{JonzonIgnore#minVersion}} and [] it
should be included for Y >= X.

Is the documentation wrong or the implementation?

Example: [] outputs
I expected it to be
{ value="valuevalue" }{code}
To sumarize: with {{@JohnzonIgnore(minVersion = 2)}} the outputs are the following:
.setVersion(1) ... {"value":"valuevalue"}
.setVersion(2) ... {}
.setVersion(3) ... {}

This message was sent by Atlassian JIRA

View raw message