On Thu, Sep 2, 2010 at 4:54 PM, Simone Tripodi <simone.trip...@gmail.com> wrote:
> Hi again,
> I've been fixing PMD-CPD-Checkstyle errors, by now PMD warnings could
> be considered trivial since they're detected on Deprecated
> methods/constructor, there is a CPD warning I'd like to fix:
>
> File                                                                    Line
> org/apache/commons/digester/SetNextRule.java    198
> org/apache/commons/digester/SetRootRule.java    191
>
> SetNextRule[1] class looks like to SetRootRule[2], what do you think
> about adding an abstract class that generalizes the behavior of both
> classes?
<snip/>

We can leave those as-is, thats not a newly flagged CPD output.

In theory, an abstract class where the method may be called on the
root, (top -1) or any stack index in between seems the generic base
class functionality. However, in practice, root and (top - 1) are most
common and the duplication we see isn't too bad or new either.

-Rahul


> Thanks in advance, have a nice day!!!
> Simo
>
> [1] 
> https://svn.apache.org/repos/asf/commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/SetNextRule.java
> [2] 
> https://svn.apache.org/repos/asf/commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/SetRootRule.java
>
> http://people.apache.org/~simonetripodi/
> http://www.99soft.org/
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to