copy paste detector - how to avoid delegate pattern
We use CPD and works very well.
Some interfaces are implemented in multiple classes. These classes share the implementation code using 'delegate' pat开发者_运维百科tern [ http://en.wikipedia.org/wiki/Delegation_pattern ]. The resulting code sometime gets bigger and reported as duplicate code. How to skip this kind of problem?
Is there an annotation or specific comment pattern to skip duplicate code detection in select part of code?
There is one for PMD -- @SuppressWarnings("PMD"). Could there be something similar for CPD?
精彩评论