title: Why is a parameter's private field visible to a generic method in Java 6 but not in Java 7?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/7719843/type-parameterized-field-of-a-generic-class-becomes-invisible-after-upgrading-to">Type-parameterized field of a generic class becomes invisible after upgrading to Java 7</a>  </p>
  </blockquote>
  
  
  
  <pre><code>public class Test{
  
      private String _canYouSeeMe = "yes";
  
      &lt;T extends Test&gt; void genericMethod(T hey){
          String s = hey._canYouSeeMe;
      }
  
      void method(Test hey){
          String s = hey._canYouSeeMe;
      }   
  }
  </code></pre>
  
  <p>When building against JDK 1.6 this compiles just fine but against 1.7 there is a compiler error in genericMethod():
  The field Test._canYouSeeMe is not visible</p>
  
  <p>The error can be resolved by making _canYouSeeMe protected rather than private, but I'm just wondering what has changed from 1.6 to 1.7</p>