private int compareString(String lhs, String rhs) {
            if (lhs == null) {
                lhs = "";
            }
            if (rhs == null) {
                rhs = "";
            }
            return lhs.compareTo(rhs);
        }
Compares sessions according to sort fields.

Instances of this comparator retain a snapshot of the state of objects it is comparing. An instance of this
comparator should therefor be discarded after use.

@author Iain Shigeoka
xmppserver/src/main/java/org/jivesoftware/openfire/SessionResultFilter.java