Uploaded image for project: 'Apache Cassandra'
  1. Apache Cassandra
  2. CASSANDRA-246

Efficient way of creating wrapper classes

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 0.4
    • None
    • None

    Description

      Instead of using new Integer(19), the best way of creating a wrapper class is Integer.valueOf(19) because it gives the JVM the chance to cache low range values, etc.

      The change affects two classes: AnalyticsContext and MetricRecord. The patch is attached to this issue.

      Attachments

        1. CASSANDRA-246.patch
          4 kB
          Edward Ribeiro

        Activity

          People

            eribeiro Edward Ribeiro
            eribeiro Edward Ribeiro
            Edward Ribeiro
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: