gitgabrio commented on code in PR #5860:
URL:
https://github.com/apache/incubator-kie-drools/pull/5860#discussion_r1575756853
##########
drools-model/drools-model-codegen/src/main/java/org/drools/model/codegen/project/KieSessionModelBuilder.java:
##########
@@ -45,8 +45,12 @@ public class KieSessionModelBuilder {
private DroolsModelBuildContext context;
public KieSessionModelBuilder(DroolsModelBuildContext context,
Collection<CodegenPackageSources> packageSources) {
+ this(context, packageSources, null);
Review Comment:
hi @mariofusco
One question: why this new constructor is needed, now ?
Beside, could you pls refactor those two constructors ?
1. instead of passing `null`, invokes `
KieModuleModelWrapper.fromResourcePaths(context.getAppPaths().getPaths()).kieBaseModels();`
2. in the next constructor, instead of putting an `if` logic, enforce the
needs of `Map<String, KieBaseModel> kieBaseModels`
That way
1. the code is clearer and less `if null` dependent
2. the meaning of the two constructors is better defined
wdyt ?
--
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]