boolean (Map<?, ?> map) { // for new XMap we do not sort LinkedHashMap if (map instanceof TreeMap || (annotation != null && map instanceof LinkedHashMap)) { return false; } return oldAnnotation == null || oldAnnotation.sortBeforeSave(); }