Call invocation.proceed() by default in abstract method interceptor
I find it strange to use AbstractMethodInterceptor without the default invocation.proceed() behavior. This way I can only override the desired method(s) and don't worry that the whole spock execution will be ruined when using foo.addInterceptor(...).
Codecov Report
Merging #1012 into master will decrease coverage by
0.08%. The diff coverage is0%.
@@ Coverage Diff @@
## master #1012 +/- ##
===========================================
- Coverage 75.99% 75.9% -0.09%
Complexity 3544 3544
===========================================
Files 377 377
Lines 10788 10800 +12
Branches 1374 1374
===========================================
Hits 8198 8198
- Misses 2109 2121 +12
Partials 481 481
| Impacted Files | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| ...k/runtime/extension/AbstractMethodInterceptor.java | 36.53% <0%> (-10.97%) |
9 <8> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update d751a0a...38a4c8d. Read the comment docs.
While it might avoid an issue, in retrospect it would have been better to throw an OperationNotSupportedException by default, since you should only register the Interceptors to where you need them. It actually is faster if there are no interceptors registered for a given extension point. And when you need it, then you'll also implement the respective function.