Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4974939

autoboxing from literals

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 5.0
    • Fix Version/s: 5.0
    • Component/s: tools
    • Subcomponent:
    • Resolved In Build:
      b40
    • CPU:
      generic
    • OS:
      solaris_8

      Description

      It would help if auto-boxing assignments of Byte/Short from literal integer worked without a cast.

      test/ConsumerFeederTest.java:77: incompatible types
      found : int
      required: java.lang.Short
              final Short value = 42;
                                  ^

        Attachments

          Activity

            People

            Assignee:
            gafter Neal Gafter
            Reporter:
            gafter Neal Gafter
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: