Jayan
Jayan

Reputation: 18458

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' pattern [ 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?

Upvotes: 2

Views: 695

Answers (0)

Related Questions