eugene-cheverda commented on PR #20222:
URL: https://github.com/apache/pulsar/pull/20222#issuecomment-1538583109

   Regression changes behavior in the following cases:
   1. For regular class, `@Data` annotated the following definition of json 
property is not serialized in `2.14.2`, gets serialized in `2.15.0`:
   ```java
   @JsonIgnore
   private transient String field4;
   
   public String getField4() {
       return field4;
   }
   
   public void setField4(String field4) {
       this.field4 = field4;
   }
   ```
   2. For `@Value` annotated class the following definitions of json property 
are not serialized in `2.14.2`, get serialized in `2.15.0`:
   ```java
   @JsonIgnore
   private transient String field3;
   
   @JsonIgnore
   private transient String field4;
   
   public String getField4() {
       return field4;
   }
   ```
   
   The most notable discrepancy in behavior between `@Data` and `@Value` 
annotated classes. The following property will be excluded for `@Data` and will 
be included in `@Value` class:
   ```java
   @JsonIgnore
   private transient String field3;
   ```
   i.e. for `@Data` annotated class `@JsonIgnore` is being propagated to the 
generated property, for `@Value` class it is not.
   
   Speaking about usages of `@JsonIgnore` and private transient field in pulsar 
code, please see the list below:
   - 
https://github.com/apache/pulsar/blob/e956db729f5098ff319237fd4220dbfb234c1b18/pulsar-common/src/main/java/org/apache/pulsar/client/impl/schema/SchemaInfoImpl.java#L73
 
   - 
https://github.com/apache/pulsar/blob/e956db729f5098ff319237fd4220dbfb234c1b18/pulsar-client/src/main/java/org/apache/pulsar/client/impl/conf/ClientConfigurationData.java#L62
 
   - 
https://github.com/apache/pulsar/blob/e956db729f5098ff319237fd4220dbfb234c1b18/pulsar-client/src/main/java/org/apache/pulsar/client/impl/conf/ProducerConfigurationData.java#L177
 
   - 
https://github.com/apache/pulsar/blob/e956db729f5098ff319237fd4220dbfb234c1b18/pulsar-client/src/main/java/org/apache/pulsar/client/impl/conf/ConsumerConfigurationData.java#L255
 
   - 
https://github.com/apache/pulsar/blob/e956db729f5098ff319237fd4220dbfb234c1b18/pulsar-client/src/main/java/org/apache/pulsar/client/impl/conf/ConsumerConfigurationData.java#L386
   - 
https://github.com/apache/pulsar/blob/e956db729f5098ff319237fd4220dbfb234c1b18/pulsar-client/src/main/java/org/apache/pulsar/client/impl/conf/ConsumerConfigurationData.java#L395
   
   All of the above occurrences are in `@Data` annotated classes, hence the 
behavior matches to the one in `2.14.2`, the absence of mentioned properties is 
covered in tests in PR
   
   If this PR gets approved/merged, I'll cherry-pick additional changes into PR 
agains `branch-3.0`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to