ShellScriptResolver, which is a sniffing MIMEResolver (opens some of the files it encounters) should rather be ordered
near the end of MIMEResolvers list (but before CND's executable file resolvers, which matches any file beginning with "#!").
As it is declared through META-INF/services (which is otherwise the best way to go), it gets evaluated among the first,
which is neither in line with its importance, nor with its sniffing nature.
To impose ordering on it, you have to rewrite it into declarative form (using "magic" tag, see e.g.
), which is good anyway for allowing further speedup in the mime resolution infrastructure.
*** Issue 119099 has been marked as a duplicate of this issue. ***
Needed fix of issue #31977 for this to be rewritten in XML.
It is a performance defect the way it is.
Fixed in issue 142760.