Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-8604

[Broker-J] Code cleanup: immutable fields, static inner classes, long literals

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Implemented
    • qpid-java-broker-8.0.6
    • qpid-java-broker-9.0.0
    • Broker-J
    • None

    Description

      Following issues are covered with this JIRA:

      1. Private fields whose values never change once they are initialized either in the declaration of the field or by a constructor should be marked as final. This aids in converting existing classes to immutable classes.

      2. A non-static inner class has a reference to its outer class, and access to the outer class' fields and methods. That class reference makes the inner class larger and could cause the outer class instance to live in memory longer than necessary.

      3. There are many places in the broker code where long literals end with lowercase 'l' character mimicking the '1'. They should be replaced with uppercase 'L'. 

      Attachments

        Activity

          People

            Unassigned Unassigned
            daniel.kirilyuk Daniil Kirilyuk
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: