private static boolean equal()

in eureka-client/src/main/java/com/netflix/discovery/util/EurekaEntityComparators.java [305:323]


    private static boolean equal(Map<String, String> first, Map<String, String> second) {
        if (first == second) {
            return true;
        }
        if (first == null || first == null && second != null || first.size() != second.size()) {
            return false;
        }
        for (Map.Entry<String, String> entry : first.entrySet()) {
            if (!second.containsKey(entry.getKey())) {
                return false;
            }
            String firstValue = entry.getValue();
            String secondValue = second.get(entry.getKey());
            if (!firstValue.equals(secondValue)) {
                return false;
            }
        }
        return true;
    }