tkobayas commented on code in PR #6803:
URL:
https://github.com/apache/incubator-kie-drools/pull/6803#discussion_r3576857848
##########
drools-model/drools-model-codegen/src/test/java/org/drools/model/codegen/execmodel/DeclaredTypesTest.java:
##########
@@ -663,14 +663,16 @@ public void testExtendPojo(RUN_TYPE runType) throws
Exception {
}
@ParameterizedTest
- @MethodSource("parameters")
+ @MethodSource("parametersPatternOnly")
public void testExtendPojoInheritedFieldsConstructor(RUN_TYPE runType)
throws Exception {
// A declared type extending a Java (classpath) class must generate a
full-argument
// constructor that also includes the superclass @Position fields and
forwards them to
- // super(...). PositionalParent has @Position(0) name and @Position(1)
age, so Child should
- // expose Child(String name, int age, String dept). The executable
model previously omitted
- // the inherited fields, generating only Child(String dept), which
failed to compile the
- // 'new Child("Mario", 40, "Sales")' consequent.
+ // super(...). PositionalParent has @Position(0) name, @Position(1)
age, and @Position(2) salary,
+ // so Child should expose Child(String name, int age, long salary,
String dept). The executable
+ // model previously omitted the inherited fields, generating only
Child(String dept), which
+ // failed to compile the 'new Child("Mario", 40, 50l, "Sales")'
consequent.
+ // Note that in case of non-exec-model, a generated constructor arg
order doesn't respect @Position,
Review Comment:
applied
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]