On 17/11/2012 17:22, Rainer Jung wrote: > On 17.11.2012 15:35, Mark Thomas wrote: >> On 17/11/2012 13:05, Rainer Jung wrote: >>> Hi, >>> >>> I did some experiments about more flexible version mapping for contextes >>> a while back and was a bit unhappy about the type unsafetyness of the >>> Mapper. Internally it only uses plain Objects and the code using it has >>> to cast everything. >>> >>> There is a patch available at >>> >>> http://people.apache.org/~rjung/patches/mapper-typesafe-trunk.patch >> >> There is a lot to take in there. I am generally in agreement but find >> myself rather overwhelmed by the patch. May I suggest you go ahead with >> just the renaming of Host->MappedHost etc and commit that to trunk >> (should be simple to do in an IDE) and then prepare a patch that makes >> the mapper type safe. > > Renaming committed as r1410752.
Thanks. Much easier to review. > Remaining patch (half the size, biggest part in TestMapper, plus the > generics in MapElement): > > http://people.apache.org/~rjung/patches/mapper-typesafe-trunk-v2.patch +1. Looks good to me. >> I suspect that the initial design allowed for a different container >> hierarchy but over time the Wrapper->Context->Host->Engine hierarchy has >> become embedded in numerous places in the code. I see no reason to >> unpick that so lets make it explicit and override getParent() for >> Wrapper, Context and Host for Tomcat 8. It will enable us to remove lots >> of casting and we may even find a few obscure bugs. > > Good, so that could be a next step after the remaining mapper > type-safety changes. +1 Mark --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org