Phillippko commented on code in PR #4887:
URL: https://github.com/apache/ignite-3/pull/4887#discussion_r1883512841


##########
modules/network-annotation-processor/src/main/java/org/apache/ignite/internal/network/processor/messages/MessageImplGenerator.java:
##########
@@ -137,12 +139,20 @@ public TypeSpec generateMessageImpl(MessageClass message, 
TypeSpec builderInterf
 
             if (getter.getAnnotation(IgniteToStringExclude.class) == null) {
                 IgniteToStringInclude includeAnnotation = 
getter.getAnnotation(IgniteToStringInclude.class);
-
-                AnnotationSpec includeAnnotationSpec = includeAnnotation == 
null
-                        ? 
AnnotationSpec.builder(IgniteToStringInclude.class).build()
-                        : AnnotationSpec.get(includeAnnotation);
-
-                fieldBuilder.addAnnotation(includeAnnotationSpec);
+                IgniteStringifier stringifierAnnotation = 
getter.getAnnotation(IgniteStringifier.class);
+
+                if (stringifierAnnotation != null) {

Review Comment:
   Inconsistent behaviour, in **IgniteToStringBuilder** we don't ignore this 
field: 
   
   ```if (incFld != null || incType != null) {
                   // Information is not sensitive when both the field and the 
field type are not sensitive.
                   // When @IgniteToStringInclude is not present then the flag 
is false by default for that attribute.
                   boolean notSens = (incFld == null || !incFld.sensitive()) && 
(incType == null || !incType.sensitive());
                   add = notSens || includeSensitive();
               } else if (stringifierField != null || stringifierType != null) {
                   add = true;
   ```
   
   Could we forbid setting both **IgniteToStringInclude** and 
**IgniteStringifier**? And **IgniteToStringInclude** / **IgniteStringifier** 
ideally should be mutually exclusive with **IgniteToStringExlude**



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to