I've noticed quite a few places in the code where the implementation type is being
used to declare variables, not the interface type, e.g.:
| ArrayList myList = new ArrayList();
|
Yuck!, should be:
| List myList = new ArrayList();
|
or:
| MessageImpl message = new MessageImpl(JBossTextMessage.TYPE, false, 0,
System.currentTimeMillis(), (byte) 1);
|
Should be:
| Message message = new MessageImpl(JBossTextMessage.TYPE, false, 0,
System.currentTimeMillis(), (byte) 1);
|
Please don't use the implementation type in this way, it leaks implementation details
and defeats the purpose of the interface/implementation split.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4149374#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...