SyntaxFix
Write A Post
Hire A Developer
Questions
I don't think you can do it in a single statement. Better do:
if (!obj.isPresent()) { logger.fatal(...); } else { obj.get().setAvailable(true); } return obj;