johnzon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Romain Manni-Bucau (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (JOHNZON-199) JohnzonIgnore#minVersion logic is negated?
Date Sat, 09 Feb 2019 15:51:00 GMT

    [ https://issues.apache.org/jira/browse/JOHNZON-199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16764168#comment-16764168
] 

Romain Manni-Bucau commented on JOHNZON-199:
--------------------------------------------

Don't worry about travis, since we don't rely on it we forgot to remove jdk we don't support
anymore, the jdk8 is green so all good, applied! Thanks a lot Alexander. (BTW i like how you
rewrite the test with junit parameterized, makes a lot of sense for this one)

> JohnzonIgnore#minVersion logic is negated?
> ------------------------------------------
>
>                 Key: JOHNZON-199
>                 URL: https://issues.apache.org/jira/browse/JOHNZON-199
>             Project: Johnzon
>          Issue Type: Bug
>    Affects Versions: 1.1.10
>            Reporter: Alexander Falb
>            Priority: Major
>
> 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 [https://johnzon.apache.org/#aJohnzonIgnore] it
should be included for Y >= X.
> Is the documentation wrong or the implementation?
> Example: [https://gist.github.com/elexx/ab5dc1f3611913a0d9f409234fbecc84] outputs
> {code:java}
> {}{code}
> I expected it to be
> {code:java}
> { value="valuevalue" }{code}
> To sumarize: with {{@JohnzonIgnore(minVersion = 2)}} the outputs are the following:
> {code:java}
> .setVersion(1) ... {"value":"valuevalue"}
> .setVersion(2) ... {}
> .setVersion(3) ... {}
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message