title: What does @Deprecated mean on method parameters and local variables?
body: <p>DISCLAIMER: I know the meaning and purpose of <code>@Deprecated</code>.</p>
  
  <p>The definition of the <code>@Deprecated</code> annotation looks like this in the source code of Java:</p>
  
  <pre class="lang-java prettyprint-override"><code>@Documented
  @Retention(RetentionPolicy.RUNTIME)
  @Target(value={CONSTRUCTOR, FIELD, LOCAL_VARIABLE, METHOD, PACKAGE, PARAMETER, TYPE})
  public @interface Deprecated {
  }
  </code></pre>
  
  <p>I understand the purpose of having target values of <code>CONSTRUCTOR</code>, <code>FIELD</code>, <code>TYPE</code>, <code>METHOD</code> and <code>PACKAGE</code>.</p>
  
  <p>However, what does it mean to mark a method parameter or a local variable as <code>@Deprecated</code>?</p>
  
  <p>Strangely the below example compiles without any warnings.</p>
  
  <pre class="lang-java prettyprint-override"><code>interface Doable {
      void doIt(@Deprecated Object input);
  }
  
  class Action implements Doable {
  
      @Override
      public void doIt(@Deprecated Object input) {
  
          String string = String.valueOf(input); // no warning!
  
          @Deprecated
          String localVariable = "hello";
  
          System.out.println("Am I using a deprecated variable?" + localVariable); // no warning!
      }
  }
  </code></pre>
  
  <p>Is this something they might intend to implement in the future?</p>
  
  <hr>
  
  <p>FWIW, I use JDK 1.7.0_11 on Ubuntu 12.04 64bit. The result is the same whether I run the program from Eclipse or command line.</p>
  
  <p>The compiler does spit out warnings for <em>normal</em> usage of <code>@Deprecated</code>, such as using one of the deprecated constructors of the <code>java.util.Date</code> class. Just to prove that I don't have a faulty terminal or set up, here is the output:</p>
  
  <pre><code>$ javac com/adarshr/Test.java -Xlint:deprecation
  com/adarshr/Test.java:12: warning: [deprecation] Date(int,int,int) in Date has been deprecated
          new Date(2013, 1, 31);
          ^
  1 warning
  $ 
  $ javac -version
  javac 1.7.0_11
  </code></pre>