title: The parameter 'foo' should not be assigned -- what's the harm?
body: <p>Compare this method:</p>
  
  <pre><code>void doStuff(String val) {
      if (val == null) {
          val = DEFAULT_VALUE;
      }
  
      // lots of complex processing on val
  }
  </code></pre>
  
  <p>... to this method:</p>
  
  <pre><code>void doStuff(String origVal) {
      String val = origVal;
      if (val == null) {
          val = DEFAULT_VALUE;
      }
  
      // lots of complex processing on val
  }
  </code></pre>
  
  <p>For the former method, Eclipse emits the warning "The parameter 'val' should not be assigned".  Why?</p>
  
  <p>To my eye, the former is cleaner.  For one thing, it doesn't force me to come up with <em>two</em> good names for <code>val</code> (coming up with one good one is hard enough).</p>
  
  <p>(Note: Assume there is no field named <code>val</code> in the enclosing class.)</p>