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

invalid unboxing in compare and other operations if primopts are enabled

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.8.2, 1.8.3, 1.8.4, 1.8.5
    • 1.8.6, 2.0-beta-3
    • primtive opts
    • None

    Description

      the program

      def proceed(){}
      def checkResponse() {return null}
      
      Integer responseCode = checkResponse()
      if (responseCode == 200) {1.8.4 running in Grails 2.0.0     
       proceed()
      } 
      

      fails with a NPE in the == operation because it tries to unbox the response code, where it should have instead boxed the constant to do the dynamic compare.

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            blackdrag Jochen Theodorou
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: