quarkiverse / quarkus-langchain4j

Quarkus Langchain4j extension
https://docs.quarkiverse.io/quarkus-langchain4j/dev/index.html
Apache License 2.0
121 stars 66 forks source link

ClassFormatError: Duplicate method name when registering AI Service #491

Closed iocanel closed 2 months ago

iocanel commented 2 months ago

This is an edge case, but I still manage to hit that.

AiServiceProcessor tries to implement the methods of the interface that @RegisterAiService is added two. The list of interfaces however, may contain methods with the same signature. An example case is when having interfaces redefine parent methods.

Either-way, we should guard against this case, as it leads to ClassForatError in the generated class.