title: Content of Collection never updated warning in Intellij IDEA
body: <p>I created a simple Counter class:</p>
  
  <pre><code>public class Counter&lt;T&gt; extends HashMap&lt;T, Long&gt; {
      public Counter() {
      }
  
      public void increase(T key) {
          put(key, getOrDefault(key, 0l) + 1);
      }
  }
  </code></pre>
  
  <p>In my code, I call the increase() method and then use Map method to access the data, e.g.</p>
  
  <pre><code>  Counter&lt;Integer&gt; counter = new Counter&lt;&gt;();
    for (Integer i: ... some collection ...)
        counter.increase(i);
  </code></pre>
  
  <p>Intellij highlights the declaration of <code>counter</code> (first line in last snippet) with warning colour, and the tooltip message says </p>
  
  <blockquote>
    <p>Contents of collection are queried, but never updated. </p>
  </blockquote>
  
  <p>Obviously I can just ignore this warning, but is there a way to convince Intellij nothing is wrong with my code? </p>
  
  <p>I am using 14.0.2 community edition. </p>