On 17/11/2019 16:34, Rainer Jung wrote: > Am 17.11.2019 um 17:21 schrieb Konstantin Kolinko:
<snip/> >> Looking into AbstractFileResourceSet.file() from the above stacktrace, >> some check are already there, e.g. "mustExist" flag. I see that >> DirResourceSet.getResource(DirResourceSet.java:101) calls file(..., >> false), so "mustExist" is false. It is just a first glance, I have not >> dug further yet. > > This is correct. A question is, whether all of the checks and > normalizations in the default DirResourceSet are need for a resource > with path starting with WEB-INF/classes, if WEB-INF/classes does not > exist. AbstractFileResourceSet in my case does return a non-null File > object after the (expensive) checks, which then is wrapped by > DirResourceSet into an EmptyResource because the file does not exist. > > Later is is found in the jar files, so the EmptyResource isn't used. > > If the class does not get found in one of the jars, one would probably > then have to create an appropriate EmptyResource to return. I think there is scope for some optimisation here. I only took a quick look but I couldn't see a way to do it without some changes to the API (I'm fine with changes but was hoping to be able to do it without). Mark --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org