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)

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          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:

              Slack

                Issue deployment