Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
StringUtils.commaDelimitedListToSet and removeDuplicateStrings should preserve original order [SPR-12003] #16619
As noticed by Gary Russell, StringUtils.commaDelimitedListToSet uses a TreeSet which will sort results. A LinkedHashSet might be a better option,
Referenced from: commits 783cb2c
Juergen Hoeller commented
I'm afraid we can't easily change
Amey Jadiye commented
Well, i'm disagree with deprecating the method, thinking with programmers perspective i still need the method which returns the Collection(Set) and not Array for sake of ease in programming.
Isssue mention in ticket is the performace hamper with the use of TreeSet which we can resolve simply replacing with LinkedHashSet.