On Fri, Mar 27, 2020 at 4:54 PM Mark Thomas <ma...@apache.org> wrote:

> On 25/03/2020 13:43, Rémy Maucherat wrote:
> > On Mon, Mar 23, 2020 at 11:11 AM Mark Thomas <ma...@apache.org
> > <mailto:ma...@apache.org>> wrote:
> >
> >     > - Reduce instances of setters and getters for the same property
> >     existing
> >     > on an object and its parent. This may require new objects to be
> >     exposed
> >     > via JMX.
> >     > Fixed enough ?
> >
> >     From memory, this was primarily on the Connectors. That is certainly
> a
> >     lot better. I'd like to review things before closing this one out.
> >
> >
> > There's indeed a problem on Connector, but I don't see how to fix it.
> >
> > Ex:
> >     public void setMaxPostSize(int maxPostSize) {
> >         this.maxPostSize = maxPostSize;
> >         setProperty("maxPostSize", String.valueOf(maxPostSize));
> >     }
> >
> > Both Catalina and Coyote need to access the value. The alternative would
> > be to have the Catalina code use getProperty, which would be both uglier
> > and slower.
>
> I don't see any use of that particular property in Coyote. I think the
> setProperty() call can be removed.
>

:D
Grep confirms that we can remove the setProperty. Ok, that was a horrible
example, but a few others in Connector are useful in both (like
maxSavePostSize, which is one I looked at, then I wrote the post talking
about maxPostSize).


>
> I'm not so sure I'll be able to do that for all the similar calls but
> I'll take a look.
>
> Context was another area where there has been a lot of this. I'll look
> there too.
>
> What I probably need to is start making a note of them when I see them
> and deal with them at the next refactoring opportunity.
>

Ok.

Rémy

Reply via email to