Maurizio Cimadamore f89b798523 8161985: Spurious override of Object.getClass leads to NPE
Attr.adjustMethodReturnType() tweaks return types w/o checking what method is being patched

Reviewed-by: vromero
2016-07-22 12:38:06 +01:00

15 lines
309 B
Java

/*
* @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();
}
}