logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Gregory (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (LOG4J2-298) Wasted work in StyleConverterTest.setupClass
Date Tue, 02 Jul 2013 05:10:20 GMT

     [ https://issues.apache.org/jira/browse/LOG4J2-298?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Gary Gregory resolved LOG4J2-298.

       Resolution: Fixed
    Fix Version/s: 2.0-beta8
         Assignee: Gary Gregory

Done as of revision 1498780.
> Wasted work in StyleConverterTest.setupClass
> --------------------------------------------
>                 Key: LOG4J2-298
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-298
>             Project: Log4j 2
>          Issue Type: Bug
>    Affects Versions: 2.0-beta7
>         Environment: any
>            Reporter: Adrian Nistor
>            Assignee: Gary Gregory
>              Labels: patch, performance
>             Fix For: 2.0-beta8
>         Attachments: patch2.diff, patch3.diff, patch.diff
> The problem appears in Log4j 2.0-beta7 and in revision 1498026.  I
> attached a one-line patch (patch.diff) that fixes it.
> In method "StyleConverterTest.setupClass", the loop over
> "config.getAppenders().entrySet()" should break immediately after
> "app" is set the first time to "entry.getValue()".  I don't think
> "app" is set a second time (and therefore all future iterations are
> not useful), but if it is, then there is a problem in the
> implementation: when the loop exits, "app" would be set to the last
> value of "entry.getValue()" that has "entry.getKey()" equal to "List";
> however "config.getAppenders().entrySet()" is a Set and therefore the
> order of iterating it is non-deterministic, i.e., the implementation
> should not rely on what the "last value" is.
> Methods "ThrowableTest.setupClass" and
> "ExtendedThrowableTest.setupClass" have similar problems. I attached
> similar patches (patch2.diff and patch3.diff respectively) for them.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org

View raw message