diff --git a/src/main/RestApi.java b/src/main/RestApi.java index b83d3df..22282bf 100644 --- a/src/main/RestApi.java +++ b/src/main/RestApi.java @@ -85,12 +85,12 @@ } private boolean listAllEquals(ArrayList list) { - boolean allEqual = true; + Object first = list.get(0); for (Object s : list) { - if(!s.equals(list.get(0))) - allEqual = false; + if(!s.equals(first)) + return false; } - return allEqual; + return true; } public enum Method {