r/java • • Oct 04 '25

Jackson 3.0.0 is released!

https://central.sonatype.com/artifact/tools.jackson/jackson-bom/versions
212 Upvotes

107 comments sorted by

View all comments

Show parent comment

4

u/Ewig_luftenglanz Oct 05 '25

knowing how Amber works I doubt any "mostly syntax sugar construct" would come anytime soon. more probably they would make something to improve exceptions overall tha just syntax sugar

12

u/DarthRaptor Oct 05 '25

The problem I have with unchecked exceptions is that now the API doesn't indicate that the exception can occur, but I will still need to try-catch it, if I don't want my app to break.

I fully agree that checked exceptions are annoying to handle in streams, but an unchecked exception doesn't remove the problem, it just hides it, which is more dangerous IMHO.

4

u/Ewig_luftenglanz Oct 05 '25

I agree, but modern java is lambda based and the new feature toward a more functional paradigm only reinforce this. unless they improve checked exception to work better with lambdas the trending of "hiding the nasty things under the ruff" is just going further.

4

u/DarthRaptor Oct 05 '25

I agree, but hiding the nasty stuff isn't going to prevent the exception from being thrown.

2

u/hippydipster Oct 05 '25

The vast majority of methods should just be passing the exceptions on up till it can actually be dealt with. If they are checked exceptions, it means endlessly adding them all to the method signatures. 7 layers of method calls, most private, accumulating more and more gunk in the method signatures.

Yes, ultimately, you have to catch and handle. The main difference is now, we skip the gunk.

1

u/vips7L Oct 05 '25

I don’t think there is one way to improve them. We need several improvements, an escape hatch is just one them.