Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-1259

Var hint not showing up when using iterator in for loop

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      Var hint is not showing up for the following scenario : 

      // code placeholder
      for (Iterator<? extends Map.Entry<? extends String, ? extends Number>> iterator =
      map.entrySet().iterator(); iterator.hasNext();) {
        Map.Entry<? extends String, ? extends Number> entry = iterator.next();
        if (max > 0) {
          iterator.remove();
          max--;
        }
      }
      

      Hint should come up to change the type of iterator to var.

        Attachments

          Activity

            People

            • Assignee:
              sakeshar Sarvesh Kesharwani
              Reporter:
              sakeshar Sarvesh Kesharwani
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: