r/java • • Mar 05 '18

Top 10 Useful, Yet Paranoid Java Programming Techniques

http://blog.jooq.org/2015/08/11/top-10-useful-yet-paranoid-java-programming-techniques/
223 Upvotes

105 comments sorted by

View all comments

Show parent comments

0

u/[deleted] Mar 06 '18

[deleted]

3

u/[deleted] Mar 06 '18

You ignore the fact that I need the "fix" in this case right now.

I'm the developer of my software. I'm responsible for how it works. That includes all the little bugs that sneak in because of someone else's code. I'm not saying we should all subscribe to the 'not invented here' line of thinking, but ultimately a bug in Apache StringUtils is a bug in RockMeetHardPlaces_APP. I am responsible for fixing it when I ship. Not when Apache decides to release the "fixed" version.

If I override a method and break it, that's MY fault. Let me support my own software please.

0

u/[deleted] Mar 07 '18

[deleted]

1

u/[deleted] Mar 07 '18

I'm the one getting yelled at when your "fix" blows up

Why would my fix even get near your stuff? I feel like you're arguing against something that I am not.

I take backwards compatibility very seriously

As do I. I am not sure how this applies to the conversation at hand.

0

u/[deleted] Mar 07 '18

[deleted]

1

u/[deleted] Mar 07 '18

Back up man. I'm talking about me using a library or some other externalized piece of code that I don't control (aka, not in my organization). If I can fix the actual bug, I'll fix the damned thing and not @Override anything.

The issue I have, specifically with final methods and classes is twofold. 1) testing with mocks -- they're handy and final makes it more difficult (2) if I need to @Override something (which I admit happens rarely, but it does happen) I'm forced to use hacky (aka reflection or C/P) to fix the issue when I could have easily just extended the external library and made it my own via a single @Override method. As I mentioned above -- I've had to do this twice in the last 6 months. So yea, it's uncommon, but it's not exceptionally rare.

How is doing this going to affect anything of "yours" blowing up? Answer: it's not. If I fuck something up, MY software blows up. It's MY bug. Not yours.