Without looking at the code, I would guess it’s stored in LinkedHashMap, which keeps track of the order, however, there are other map structures that keep order as well.
> On Mar 7, 2024, at 1:31 PM, Steinar Bang <s...@dod.no> wrote: > > I know from experience that the order of the [url] setion of the > shiro.ini file is significant: earlier entries will override entries > further down. > > What I'm unable to see, is how that order is preserved in shiro? > > As far as I can tell the entries of the [url] section are iterated over > here > https://github.com/apache/shiro/blob/main/web/src/main/java/org/apache/shiro/web/config/IniFilterChainResolverFactory.java#L159 > > And then FilterManager.addFilter() is called in the iteration order. > > And when iterating over a Map.entrySet() the order is undefined. The > order is left to the internal implementation of the map. > > So how is the order of the [url] section preserved? > > Just curious? (as well as trying to figure out how I can > programmatically modify the filters of the [url] section at runtime) > > Thanks! > > > - Steinar >