The Repetita Juvant Principle

Welcome to anti-refactoring lesson number 3.

The "Repetita Juvant Principle" is the counterpart of the DRY principle:

1    @Override
2    public SomeObject getSomeObject() {
3        return super.getSomeObject();
4    }
5
6    @Override
7    public void setSomeObject(SomeObject arg0) {
8        super.setSomeObject( arg0 );
9    }

Then, you may think... this code has been written for some purpose, right? The only purpose of this code could be to expose as public a method that is protected on the superclass. So I checked the superclass and, guess what...? The methods were already public! Simply fantastic.


No Responses to “The Repetita Juvant Principle”  

  1. No Comments

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>



Calendar

October 2008
M T W T F S S
« Sep   Nov »
 12345
6789101112
13141516171819
20212223242526
2728293031  

Follow me

twitter flickr LinkedIn feed

Subscribe by email

Enter your email address:

Archives


Categories

Tag Cloud


Listening