SCJP (1.4 | 5.0), OCJP (6.0), OCMJD
SCJP (1.4 | 5.0), OCJP (6.0), OCMJD
Sean Keane wrote:Using Objects.requireNonNull is using exceptions to do parameter checking?
Dave Tolls wrote:All classes should be final (IMO) unless someone has to extend them..
SCJP (1.4 | 5.0), OCJP (6.0), OCMJD
Sean Keane wrote:
Ideally yes, but then it makes unit testing more difficult. Requiring you to use something like Powermock to mock the final class - I'd rather not use this.
SCJP (1.4 | 5.0), OCJP (6.0), OCMJD
Sean Keane wrote:I can't have a proliferation of interfaces purely for sake of marking implementation final.
SCJP (1.4 | 5.0), OCJP (6.0), OCMJD
Sean Keane wrote:Technically nothing stopping me of course. Does every single class you want to unit test in applications you develop implement an interface?
SCJP (1.4 | 5.0), OCJP (6.0), OCMJD
If somebody says you look familiar, tell them you are in porn. Or in these tiny ads:
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
|