You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by bu...@apache.org on 2003/09/30 15:15:08 UTC

DO NOT REPLY [Bug 23517] New: - Noop assignment in DateFormatManager.setTimeZone()

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