Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-274

Wasted work in UUIDUtil initialization

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0-beta6
    • Fix Version/s: 2.0-beta8
    • Component/s: None
    • Labels:
    • Environment:

      any

      Description

      The problem appears in Log4j 2.0-beta6 and in revision 1490297. I
      attached a one-line patch that fixes it.

      In the static initialization block for "UUIDUtil", the loop over
      "sequences" should break immediately after "duplicate" is set to
      "true". All the iterations after "duplicate" is set to "true" do not
      perform any useful work, at best they just set "duplicate" again to
      "true".

        Attachments

        1. patch.diff
          0.6 kB
          Adrian Nistor

          Activity

            People

            • Assignee:
              garydgregory Gary Gregory
              Reporter:
              adriannistor Adrian Nistor
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: