Possible Duplicate:
Should you wrap 3rd party libraries that you adopt into your project?
I am using mail.jar, an opensource api to send mails in java.
I am wondering whether I should wrap its call to my own framework like this :
DedicatedFramework.sendMail(subject, body, recipientList);
this dedicatedFramework would then make the necessary calls to mail.jar.
The idea is that if tomorrow I replace mail.jar with a new version which deprecates/changes methods, then I reduce my coupling.
On the other hand, I add boiler code just to "hide" the framework.
What do you people do regarding this ?
Of course, it could be another framework than mail : picture managing, jdbcTemplate, GoogleCollections ...