This looks like it'd give a ClassCastException in java (e.g. if flags.get(USE_PID_FILE) returned a StringBuffer instead of a String, so matched the `instanceof CharSequence` check). Will fix in next pull request.