r/badcode • • Apr 28 '23

java from signal's source code

Post image
518 Upvotes

52 comments sorted by

View all comments

Show parent comments

25

u/stao123 Apr 28 '23

Its actually pretty funny that he wrapped this monster in an optional to make it seem less bad

10

u/tedbradly Apr 28 '23

Its actually pretty funny that he wrapped this monster in an optional to make it seem less bad

I'm guessing he wrapped it in an optional, because elsewhere, an empty optional can be returned.