author | robm |
Tue, 13 Sep 2016 14:47:29 +0100 | |
changeset 40938 | 5b0977acc842 |
parent 39810 | d290bef927c4 |
permissions | -rw-r--r-- |
39810
d290bef927c4
8161985: Spurious override of Object.getClass leads to NPE
mcimadamore
parents:
diff
changeset
|
1 |
/* |
d290bef927c4
8161985: Spurious override of Object.getClass leads to NPE
mcimadamore
parents:
diff
changeset
|
2 |
* @test /nodynamiccopyright/ |
d290bef927c4
8161985: Spurious override of Object.getClass leads to NPE
mcimadamore
parents:
diff
changeset
|
3 |
* @bug 8161985 |
d290bef927c4
8161985: Spurious override of Object.getClass leads to NPE
mcimadamore
parents:
diff
changeset
|
4 |
* @summary Spurious override of Object.getClass leads to NPE |
d290bef927c4
8161985: Spurious override of Object.getClass leads to NPE
mcimadamore
parents:
diff
changeset
|
5 |
* @compile/fail/ref=T8161985b.out -XDrawDiagnostics T8161985b.java |
d290bef927c4
8161985: Spurious override of Object.getClass leads to NPE
mcimadamore
parents:
diff
changeset
|
6 |
*/ |
d290bef927c4
8161985: Spurious override of Object.getClass leads to NPE
mcimadamore
parents:
diff
changeset
|
7 |
|
d290bef927c4
8161985: Spurious override of Object.getClass leads to NPE
mcimadamore
parents:
diff
changeset
|
8 |
class T8161985b { |
d290bef927c4
8161985: Spurious override of Object.getClass leads to NPE
mcimadamore
parents:
diff
changeset
|
9 |
public String getClass() { return ""; } |
d290bef927c4
8161985: Spurious override of Object.getClass leads to NPE
mcimadamore
parents:
diff
changeset
|
10 |
|
d290bef927c4
8161985: Spurious override of Object.getClass leads to NPE
mcimadamore
parents:
diff
changeset
|
11 |
void test() { |
d290bef927c4
8161985: Spurious override of Object.getClass leads to NPE
mcimadamore
parents:
diff
changeset
|
12 |
this.getClass().getSimpleName(); |
d290bef927c4
8161985: Spurious override of Object.getClass leads to NPE
mcimadamore
parents:
diff
changeset
|
13 |
} |
d290bef927c4
8161985: Spurious override of Object.getClass leads to NPE
mcimadamore
parents:
diff
changeset
|
14 |
} |