Lint error "Do not treat position as fixed; only use immediately..." : <p>I'm contributing to open source library and got lint error <strong>"Do not treat position as fixed; only use immediately and call holder.getAdapterPosition() to look it up later"</strong> for this code:</p>

<pre><code>  @Override public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
    mAdapter.onBindViewHolder(holder, position);

    if (!isFirstOnly || position &gt; mLastPosition) {
      for (Animator anim : getAnimators(holder.itemView)) {
        anim.setDuration(mDuration).start();
        anim.setInterpolator(mInterpolator);
      }
      mLastPosition = position;
    } else {
      ViewHelper.clear(holder.itemView);
    }
  }
</code></pre>

<p>I've checked that it is because the position is saved for the future use. It is a question to library creator why they need this logic. But issue disappeared when I change the usage of the position to the usage <code>holder.getAdapterPosition()</code>:</p>

<pre><code>  @Override public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
    mAdapter.onBindViewHolder(holder, position);

    if (!isFirstOnly || holder.getAdapterPosition() &gt; mLastPosition) {
      for (Animator anim : getAnimators(holder.itemView)) {
        anim.setDuration(mDuration).start();
        anim.setInterpolator(mInterpolator);
      }
      mLastPosition = holder.getAdapterPosition();
    } else {
      ViewHelper.clear(holder.itemView);
    }
  }
</code></pre>

<p>I assume that conceptually it didn't change much but lint is satisfied now. Why? </p>
