logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 23517] New: - Noop assignment in DateFormatManager.setTimeZone()
Date Tue, 30 Sep 2003 13:15:08 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23517>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23517

Noop assignment in DateFormatManager.setTimeZone()

           Summary: Noop assignment in DateFormatManager.setTimeZone()
           Product: Log4j
           Version: 1.2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Other
        AssignedTo: log4j-dev@jakarta.apache.org
        ReportedBy: aarong@cs.cmu.edu


The method setTimeZone() in org.apache.log4j.lf5.util.DateFormatManager is 
incorrect.  The method (in version 1.2.8 of Log4j) is 

  public synchronized void setTimeZone(TimeZone timeZone) {
    timeZone = timeZone;
    configure();
  }

The assignment is bogus, it assigns the parameter to itself.  Obviously this is 
a typo, and should be:

  public synchronized void setTimeZone(TimeZone timeZone) {
    _timeZone = timeZone;
    configure();
  }

(This error was found when I brought the file up in the Eclipse IDE.  Eclipse 
automatically checks for "assignments with no effect", and flagged this 
assignment with a warning.)

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


Mime
View raw message