When building a Query programmatically using the DSL and executing "must()" / "should()" operations, it is possible that the actual Query one wants to pass as sub criteria was pre-constructed by some different code, and optional. When it's null, the invoker of the DSL needs to write some annoying workarounds to skip actually invoking the must method. We could accept a null and behave like the clause was not to add. |