I would do the check the other way around here: method.equalsIgnoreCase(Method.POST), semantically more obvious what you're trying to do