zstan commented on code in PR #13220:
URL: https://github.com/apache/ignite/pull/13220#discussion_r3378023453
##########
modules/codegen/src/main/java/org/apache/ignite/internal/MessageProcessor.java:
##########
@@ -146,6 +151,34 @@ public class MessageProcessor extends AbstractProcessor {
return true;
}
+ /** */
+ private boolean checkConstructors(TypeElement clazz) {
+ boolean isMarshallableMsg = isAssignable(
+ clazz.asType(),
+
processingEnv.getElementUtils().getTypeElement("org.apache.ignite.internal.MarshallableMessage")
+ );
+
+ for (Element el : clazz.getEnclosedElements()) {
+ if (el.getKind() != ElementKind.CONSTRUCTOR)
+ continue;
+
+ ExecutableElement c = (ExecutableElement)el;
+
+ boolean isDfltConstructor = F.isEmpty(c.getParameters());
+
+ if (isDfltConstructor && !isMarshallableMsg)
+ return true;
+ }
+
+ processingEnv.getMessager().printMessage(
+ Diagnostic.Kind.ERROR,
+ "Class must have default constructor: " + clazz.getQualifiedName(),
Review Comment:
```suggestion
"A class must have a default constructor: " +
clazz.getQualifiedName(),
```
--
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]