AxonFramework / AxonFramework

Framework for Evolutionary Message-Driven Microservices on the JVM
https://axoniq.io/
Apache License 2.0
3.34k stars 794 forks source link

Duplicate command handler resolver is triggered in polymorphic aggregates #2243

Closed CodeDrivenMitch closed 2 years ago

CodeDrivenMitch commented 2 years ago

Basic information

Steps to reproduce

Expected behaviour

The duplicate command handler resolver is not triggered.

Actual behaviour

The duplicate command handler resolver is triggered.

CodeDrivenMitch commented 2 years ago

After testing this with the customer, it has not been fixed. The testcase provided in the PR was wrong. The aggregate structure which caused the issue looks like this:

@SuppressWarnings("unused")
abstract class RootAggregate {
    @CommandHandler
    public void handle(String command) {
    }
}
class ChildAggregate extends RootAggregate {
    @CommandHandler
    @Override
    public void handle(String command) {
    }
}

I am reopening the issue and targeting the correct fix for the 4.5.x branch

smcvb commented 2 years ago

Closing this issue as it was resolved in pull request #2298.