fjtirado commented on code in PR #3242:
URL:
https://github.com/apache/incubator-kie-kogito-runtimes/pull/3242#discussion_r1345761439
##########
quarkus/extensions/kogito-quarkus-serverless-workflow-extension/kogito-quarkus-serverless-workflow-deployment/src/main/java/org/kie/kogito/quarkus/serverless/workflow/ClassAnnotatedWorkflowHandlerGenerator.java:
##########
@@ -46,16 +47,31 @@ public Collection<WorkflowHandlerGeneratedFile>
generateHandlerClasses(KogitoBui
protected abstract Stream<WorkflowHandlerGeneratedFile>
generateHandler(KogitoBuildContext context, AnnotationInstance a);
protected final com.github.javaparser.ast.type.Type fromClass(Type param) {
+ return fromClass(param, true);
+ }
+
+ protected final com.github.javaparser.ast.type.Type fromClass(Type param,
boolean includeGeneric) {
switch (param.kind()) {
case CLASS:
- return
parseClassOrInterfaceType(param.asClassType().name().toString());
+ return
parseClassOrInterfaceType(fromDotName(param.asClassType().name()));
case PRIMITIVE:
- return parseType(param.asPrimitiveType().name().toString());
+ return parseType(fromDotName(param.asPrimitiveType().name()));
case PARAMETERIZED_TYPE:
- return
parseClassOrInterfaceType(param.asParameterizedType().name().toString())
-
.setTypeArguments(NodeList.nodeList(param.asParameterizedType().arguments().stream().map(this::fromClass).collect(Collectors.toList())));
+ ClassOrInterfaceType result =
parseClassOrInterfaceType(fromDotName(param.asParameterizedType().name()));
+ if (includeGeneric) {
Review Comment:
And this is basically the fix (rest of clasess on this PR are for testing),
we do not want to include generic when the ClassExpr is not used for casting.
Since the caller knows the usage, an extra boolean parameter was added to the
method
--
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]