Abhitocode commented on code in PR #3850:
URL: 
https://github.com/apache/incubator-kie-kogito-runtimes/pull/3850#discussion_r1971695929


##########
kogito-codegen-modules/kogito-codegen-processes/src/main/java/org/kie/kogito/codegen/process/StaticDependencyInjectionProducerGenerator.java:
##########
@@ -58,12 +60,23 @@ public Map<String, String> generate() {
      * @return Map with the generated resources
      */
     public Map<String, String> generate(List<String> templates) {
+        return generate(templates, null);
+    }
+
+    public Map<String, String> generate(List<String> templates, String 
customClass) {
         if (!context.hasDI()) {
             return Collections.emptyMap();
         }
         return templates.stream().map(this::buildProducerTemplatedGenerator)
                 
.collect(Collectors.toMap(TemplatedGenerator::generatedFilePath,
-                        generator -> 
generator.compilationUnitOrThrow().toString()));
+                        generator -> {
+                            CompilationUnit compilationUnit = 
generator.compilationUnitOrThrow();
+                            if (customClass != null) {
+                                //compilationUnit.replace(new 
SimpleName("$customBusinessCalendar$"), new SimpleName(customClass));
+                                return 
compilationUnit.toString().replace("$customBusinessCalendar$", customClass);

Review Comment:
   It was  due to initial implementation, forgot to revert. Corrected.



-- 
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]

Reply via email to