The following code used to compile fine:
optional.orElseThrow(() -> new RuntimeException("Could not create stuff"))
After upgrad