Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not exit with an error if repository has a default implementation #2787

Closed
wants to merge 2 commits into from

Conversation

andriy-dmytruk
Copy link
Contributor

This is useful if a repository wants to implement and customize another interface, e.g.:

interface MyRepo extends RequiredRepo, CrudRepository<MyObject, String> {

    @Override
    default getByName(String name) {
        return getById(name);
    }

    // This is to be implemented by micronaut-data instead of the above method
    getById(String id);

}

@andriy-dmytruk andriy-dmytruk force-pushed the andriy/default-interface-impl branch from d0db382 to 7534158 Compare February 9, 2024 15:22
@dstepanov
Copy link
Contributor

Can you please a test?

Copy link

sonarqubecloud bot commented Feb 9, 2024

@andriy-dmytruk
Copy link
Contributor Author

@dstepanov Is this test Ok?

@dstepanov
Copy link
Contributor

I tried your example, and the visit method is skipped because the method is not abstract. Where did you find this problem?

@andriy-dmytruk
Copy link
Contributor Author

I cannot reproduce the problem now. Strange, maybe it was something different.
I suppose this behavior works already, indeed. Thanks.

@andriy-dmytruk andriy-dmytruk deleted the andriy/default-interface-impl branch February 14, 2024 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants