RFR: CODETOOLS-7902237: Fixing raw use of parameterized class

Jonathan Gibbons jonathan.gibbons at oracle.com
Tue Jul 24 21:14:09 UTC 2018



On 07/24/2018 07:48 AM, dmitry.bessonov at oracle.com wrote:
> Please review the following fix related to "raw use of parameterized 
> class" warning:
>
> JBS: https://bugs.openjdk.java.net/browse/CODETOOLS-7902237
> Webrev: http://cr.openjdk.java.net/~dbessono/7902237/webrev/
>
> dmitry

  386             for (Iterator<?> iter = other.getIterator(false); iter.hasNext(); ) {
  387                 Entry otherEntry = (Entry) (iter.next());

can be

  386             for (Iterator<Entry> iter = other.getIterator(false); iter.hasNext(); ) {
  387                 Entry otherEntry = iter.next();

although, is it guaranteed that the iterator always returns Entry 
objects?  (Never Entry[]?)

-- Jon


More information about the jtharness-dev mailing list