ncredinburgh / JavaForSmallTeams

Guidance on writing "good" server side java
https://www.gitbook.com/book/ncrcoe/java-for-small-teams
Other
69 stars 31 forks source link

Replace suggestion to use `Throwables.propagate` with Java 7 multi-catch #33

Open iksnibarg opened 6 years ago

iksnibarg commented 6 years ago

Guava's Throwables.propagate got deprecated for good reasons: https://github.com/google/guava/wiki/Why-we-deprecated-Throwables.propagate

I'd suggest replacing suggestion to use Throwables.propagate with suggestion to use Java 7 multi-catch or removing mentioning usage of Throwables.propagate from this chapter completely.

I also do not feel good about mentioning catching of Throwables in the context of handling APIs that declare checked exceptions.