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

api/java_util/EnumMap compilation failures

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: 7
    • Fix Version/s: 7
    • Component/s: tools
    • Labels:
      None
    • Subcomponent:
    • Introduced In Build:
      b55
    • Introduced In Version:
      7
    • CPU:
      generic
    • OS:
      generic

      Description

      The tests on java.util.EnumMap use the following code pattern:
      ---------------------------------------------------------
          Object [] array = {
              Suit.CLUBS, null,
              Suit.DIAMONDS, "val1",
              Suit.HEARTS, "val2",
              Suit.SPADES, new Integer(1)
          };
          ...
          EnumMap map = new EnumMap(Suit.class);
          ...
          for (int j = 0; j < i; j += 2) {
              map.put(array[j], array[j + 1]); // *
          }
      ---------------------------------------------------------

      The line marked (*) cause compilation error since JDK7 b55 with the output:
      ---------------------------------------------------------
      minitest.java:15: cannot find symbol
              map.put(array[0], array[1]);
                 ^
        symbol: method put(java.lang.Object,java.lang.Object)
        location: class java.util.EnumMap
      ---------------------------------------------------------

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                dmiltsov Dmitry Miltsov (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: