We cannot change the existing method signature. We could add a new one and deprecate the old, log a warning if a non-LinkedHashMap is used, or create a different mechanism (non-map) approach to setting the definitions.
For Shiro 1.4 (still RC, so can be changed), I added a ShiroFilterChainDefinition <https://github.com/apache/shiro/blob/master/support/spring/src/main/java/org/apache/shiro/spring/web/config/ShiroFilterChainDefinition.java> interface, and the default impl <https://github.com/apache/shiro/blob/master/support/spring/src/main/java/org/apache/shiro/spring/web/config/DefaultShiroFilterChainDefinition.java#L32-L34> . NOTE: the intent behind this is to make it easier to define the required beans, see the example here <https://github.com/apache/shiro/blob/master/samples/spring-boot-web/src/main/java/org/apache/shiro/samples/WebApp.java#L84-L90> Thoughts ? On Thu, Jan 19, 2017 at 6:52 AM, Richard Wheeldon < [email protected]> wrote: > TreeMap sorts according to the natural order of the elements (or using a > comparator). It doesn't preserve order. i.e. If you put Alice, Charlie and > Bob into a LinkedHashMap in that order you get Alice, Charlie and Bob out. > If you put them into a TreeMap you get Alice, Bob, Charlie > > -----Original Message----- > From: scSynergy [mailto:[email protected]] > Sent: Thursday, January 19, 2017 9:40 AM > To: [email protected] > Subject: Re: bug report > > One other possibility, though far from perfect, is to have > shiroFilter.setFilterChainDefinitionMap(definitionsMap) only accept > LinkedHashMap or TreeMap as parameters instead of accepting just any Map. I > think those are the only Map implementations in standard Java SE which > retain order. > > > > -- > View this message in context: http://shiro-user.582556.n2. > nabble.com/bug-report-tp7581461p7581464.html > Sent from the Shiro User mailing list archive at Nabble.com. >
