langtools/test/tools/javac/8161985/T8161985b.java
author robm
Tue, 13 Sep 2016 14:47:29 +0100
changeset 40938 5b0977acc842
parent 39810 d290bef927c4
permissions -rw-r--r--
6947916: JarURLConnection does not handle useCaches correctly Reviewed-by: chegar

/*
 * @test /nodynamiccopyright/
 * @bug 8161985
 * @summary Spurious override of Object.getClass leads to NPE
 * @compile/fail/ref=T8161985b.out -XDrawDiagnostics T8161985b.java
 */

class T8161985b {
   public String getClass() { return ""; }

   void test() {
      this.getClass().getSimpleName();
   }
}