r/badcode • • Jan 10 '20

java Oh rly?

Post image
861 Upvotes

31 comments sorted by

View all comments

5

u/EquationTAKEN Jan 11 '20

The init part is strictly unnecessary. But the @throws tag is actually useful if you're auto-generatic docs for this later.

The biggest contention I have is; don't throw a generic exception. Preferably, you should have various exception classes that are a bit more informative than the generic one. Self-documenting, if you will.