On Thu, Mar 20, 2025 at 11:49 AM Mark Thomas <ma...@apache.org> wrote: > > On 20/03/2025 10:22, Mark Thomas wrote: > > On 19/03/2025 09:51, r...@apache.org wrote: > >> This is an automated email from the ASF dual-hosted git repository. > >> > >> remm pushed a commit to branch main > >> in repository https://gitbox.apache.org/repos/asf/tomcat.git > >> > >> > >> The following commit(s) were added to refs/heads/main by this push: > >> new e5de08a569 Add new registry factory that does not return null > >> e5de08a569 is described below > >> > >> commit e5de08a56913479d024b00ff58eea7896025f103 > >> Author: remm <r...@apache.org> > >> AuthorDate: Wed Mar 19 10:50:58 2025 +0100 > >> > >> Add new registry factory that does not return null > >> Adding null checks everywhere is not worth it. > > > > <snip/> > > > >> + /** > >> + * Factory method to create (if necessary) and return our > >> + * <code>Registry</code> instance. > >> + * > >> + * @param key Unused > > > > Given this parameter is never used, why not remove it for the new method? > > Thinking about it some more, changing the signature means you could keep > the getRegistry() method name.
Ok, I like this a lot ! :) Thanks ! I don't remember what this parameter was supposed to be for, maybe having multiple registries. Definitely not going to get used. Rémy > Mark > > > > >> + * @param guard Prevent access to the registry by untrusted > >> components > >> + * > >> + * @return the registry > >> + * @throws IllegalArgumentException if the guard object does not > >> allow access > >> + * @since 1.1 > > > > That @since tag should probably not be there. > > > > > > Deprecate (and remove in Tomcat 12) the old method? > > > > Mark > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > > For additional commands, e-mail: dev-h...@tomcat.apache.org > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org