How can I check whether a string is not null and not empty?
public void doStuff(String str) { if (str != null && str != \"**here I want to check
It is a bit too late, but here is a functional style of checking:
Optional.ofNullable(str) .filter(s -> !(s.trim().isEmpty())) .ifPresent(result -> { // your query setup goes here });