title: How to remove 'Assignment of Parameter 'variable' is not allowed'
body: <p>I'm programming a Controller using Java and I'm checking the style using Sonar. In my Sonar I have an error that says: </p>
  
  <blockquote>
    <p>'Assignment of Parameter 'variable' is not allowed.</p>
  </blockquote>
  
  <p>The line that it's on is:</p>
  
  <pre><code>@RequestParam(value="variable", required=false) String variable
  </code></pre>
  
  <p>So I'm wondering how I could get that error off since I can't just create a setter when I'm using that annotation.</p>
  
  <h2>EDIT</h2>
  
  <p>I'm using <code>Eclipse</code>. The rule being broke is <code>Parameter Assignment</code>.</p>
  
  <pre><code>@RequestParam(value="variable", required=false) String variable
  if (variable != null &amp;&amp; variable.compareTo("") == 0) {
      variable = null;
  }
  </code></pre>