With a null result string, there would be an NPE. You might want to put the constant first or use StringUtils.equals().