TNG / ArchUnit

A Java architecture test library, to specify and assert architecture rules in plain Java
http://archunit.org
Apache License 2.0
3.18k stars 288 forks source link

Add possibility to check for overriding methods to domain and lang #1200

Open rweisleder opened 9 months ago

rweisleder commented 9 months ago

Resolves: #1198

rweisleder commented 5 months ago

I just saw, there is another issue/PR #1040 for the same topic 😅 At the moment, I haven't looked more deeply into whether my implementation is too simple or the other one too verbose.

codecholeric commented 4 months ago

Thanks a lot for your contribution and sorry for the slow process 🙈 I see that there is another PR going in the same direction, but from my point of view it a) looks further away from being finished and b) it seems quite abandoned 🤔 So, I think it makes sense to bring this PR here over the finish line. I think there is still one problem in there with Generics and bridge methods, i.e. when overriding a generic interface, then the bridge method works alright being detected as overriding, but the concrete method containing the fixed type is not detected as overriding. I added a test for this. How do you see this? To me it seems like the concrete overriding method should also be detected as such, right? 🤔

rweisleder commented 3 months ago

Generics, how could I have missed them 🤢 You're absolutely right, these are valid cases as well. Maybe I'll find time to complete this soon

sorry for the slow process

I'm part of the slow process as well, no worries