Skip to main content

ComponentProvider issue

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
No replies
Spinnifex
Offline
Joined: 2011-03-29

Hello,

For me the ComponentProvider class got a little flaw.

The abstract methods :

<br />
format( CellContext cc );<br />

<br />
configureState( CellContext cc );<br />

can be merged together.

There is no reason to call a method with different signatures but the same argument( same reference ) twice ?!
It is confusing for clients to figure out what they should "do there".
What I have seen in the LabelProvider class is nothing we can't write in one single method.

Are there any reasons for two methods?

Regards,

Spinni