On Sat, Jul 22, 2017 at 6:50 AM, João Paulo Lemes Machado <
[email protected]> wrote:

> Hi Gary. I sent one list of refactoring  opportunities to the dev-mailing
> list. Can you tell me if it was received?
>

Hi,

Feel free to scan the archives to see who got what:
https://logging.apache.org/log4j/2.x/mail-lists.html

Gary


>
> 2017-07-20 17:16 GMT-03:00 Gary Gregory (JIRA) <[email protected]>:
>
> >
> >     [ https://issues.apache.org/jira/browse/LOG4J2-1979?page=
> > com.atlassian.jira.plugin.system.issuetabpanels:comment-
> > tabpanel&focusedCommentId=16095296#comment-16095296 ]
> >
> > Gary Gregory commented on LOG4J2-1979:
> > --------------------------------------
> >
> > StrSubstitutor work should be done first in the Apache Commons Lang
> > project. IMO that is.
> >
> > > Refactoring of StrSubstitutor
> > > -----------------------------
> > >
> > >                 Key: LOG4J2-1979
> > >                 URL: https://issues.apache.org/jira/browse/LOG4J2-1979
> > >             Project: Log4j 2
> > >          Issue Type: Improvement
> > >          Components: Core
> > >            Reporter: João Paulo Lemes Machado
> > >
> > > Hello everyone.
> > > I was analyzing the modularization of some classes, and I identified
> > that the class StrSubstitutor has an opportunity for cohesion
> improvement.
> > > The class ParameterizedMessage was in the same situation and the
> problem
> > was solved as follows: The ParameterFormatter class was created, and
> > several get() and set() methods that were used only to configure the
> class
> > parameters were moved from ParameterizedMessage to ParameterFormatter.
> > > The new class was then accessed through an instance variable in
> > ParameterizedMessage. This strategy has cleaned and improved
> > ParameterizedMessage cohesion.
> > > With this in mind, I would recommend creating a new class:
> > StrSubstitutorConfig , and moving the following methods:
> > > setVariableSuffixMatcher
> > > setEscapeChar
> > > getValueDelimiterMatcher
> > > setVariableSuffix
> > > setValueDelimiter
> > > setVariableResolver
> > > getVariableResolver
> > > getVariablePrefixMatcher
> > > setVariablePrefix
> > > setVariableSuffix
> > > setValueDelimiter
> > > setEnableSubstitutionInVariables
> > > setConfiguration
> > > setVariablePrefix
> > > getVariableSuffixMatcher
> > > getChars
> > > setVariablePrefixMatcher
> > > setValueDelimiterMatcher
> > > getEscapeChar
> > > from the StrSubstitutor.
> > > Those parameters accessed by an instance variable in the
> StrSubstitutor.
> > > Moreover, the orthogonality is the design would be enhanced.
> > > What do you think about that?
> >
> >
> >
> > --
> > This message was sent by Atlassian JIRA
> > (v6.4.14#64029)
> >
>

Reply via email to