Uploaded image for project: 'Commons Logging'
  1. Commons Logging
  2. LOGGING-64

Wrong sample code in org/apache/commons/logging/package.html (using static and this.class)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • Nightly Builds
    • 1.0.4
    • None
    • Operating System: other
      Platform: Other

    • 18889

    Description

      In the org/apache/commons/logging/package.html file, there is sample code:

      public class Foo {
      static Log log = LogFactory.getLog(this.class);
      ...
      }

      This code cannot be compiled because of using "static" and "this.class" in the
      same statement. Should be change to Foo.class.

      Attachments

        Activity

          People

            Unassigned Unassigned
            thaiha@psv.com.vn Thai Ha
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: