examples in LinkedHashMap and LinkedHashSet class doc use raw types

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P5
    • 16
    • Affects Version/s: None
    • Component/s: core-libs
    • None

      The LinkedHashMap class doc contains the following example:

           void foo(Map m) {
               Map copy = new LinkedHashMap(m);
               ...
           }

      This uses raw types. It should use upgraded to use generics. Probably something like

          <K,V> void foo(Map<K,V> m) {
              Map<K,V> copy = new LinkedHashMap<>(m);
              // ...
          }

            Assignee:
            Stuart Marks
            Reporter:
            Stuart Marks
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: