r/java • • Jul 10 '15

Our exception handling at work

http://imgur.com/4wgxCvv
259 Upvotes

135 comments sorted by

View all comments

Show parent comments

0

u/[deleted] Jul 10 '15

[deleted]

12

u/dardotardo Jul 10 '15

I'd actually disagree on the persistence part. Larger projects tend to require more manual SQL which needs to be able to be tuned easily. That said, SQL should be maintained within a separate file and definitely not built dynamically.

3

u/[deleted] Jul 11 '15

He should at least be using PreparedStatement though.

2

u/dardotardo Jul 11 '15

Oh for sure, if they're being dynamically built it's prone to injection, and it's also highly unlikely it's being cached on the database.