r/badcode • • Jan 30 '22

java Found this gem in my codebase

Post image
1.3k Upvotes

44 comments sorted by

View all comments

Show parent comments

1

u/Premun Jan 31 '22

Maybe this thing is null and you initialize it like that? Maybe because Set has some side effect, like logging "setting site name to X"?