title: init object inline and pass as parameter - java
body: <p>Why is orElse executed everytime even though it shouldn't?
  What am I doing wrong here? I am still learning java :)</p>
  
  <pre><code> Optional.ofNullable(myVar)
            .orElse(Optional.ofNullable(myVar = ...)))
                  .orElseThrow(MyException::new))
  </code></pre>