Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-4412

FindBugs errors for new Integer() vs. Integer.valueOf() like calls

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.7.5, 1.8-beta-2
    • 1.7.5, 1.8-beta-2
    • None
    • None

    Description

      Groovy compiler seems to be generating calls like {{ new Integer() }} and {{ new Long() }} (also for other number wrapper types), which FindBugs tool calls out as performance issues and suggests that the equivalent calls {{ Integer.valueOf() }} and {{ Long.valueOf() }} be used.

      Class generation needs to change a bit to support it to reduce the errors reported by FindBugs for groovy classes.

      Attachments

        1. 4412_v18x.diff
          3 kB
          Roshan Dawrani
        2. v2_4412_v18x.diff
          4 kB
          Roshan Dawrani

        Issue Links

          Activity

            People

              roshandawrani Roshan Dawrani
              roshandawrani Roshan Dawrani
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: