author | jjg |
Tue, 21 Oct 2014 17:50:13 -0700 | |
changeset 27226 | 53535e4e1b08 |
parent 23111 | ef4562cfb234 |
permissions | -rw-r--r-- |
23111
ef4562cfb234
8033421: @SuppressWarnings("deprecation") does not work when overriding deprecated method
jlahoda
parents:
diff
changeset
|
1 |
/* |
ef4562cfb234
8033421: @SuppressWarnings("deprecation") does not work when overriding deprecated method
jlahoda
parents:
diff
changeset
|
2 |
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. |
ef4562cfb234
8033421: @SuppressWarnings("deprecation") does not work when overriding deprecated method
jlahoda
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
ef4562cfb234
8033421: @SuppressWarnings("deprecation") does not work when overriding deprecated method
jlahoda
parents:
diff
changeset
|
4 |
* |
ef4562cfb234
8033421: @SuppressWarnings("deprecation") does not work when overriding deprecated method
jlahoda
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
ef4562cfb234
8033421: @SuppressWarnings("deprecation") does not work when overriding deprecated method
jlahoda
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
ef4562cfb234
8033421: @SuppressWarnings("deprecation") does not work when overriding deprecated method
jlahoda
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
ef4562cfb234
8033421: @SuppressWarnings("deprecation") does not work when overriding deprecated method
jlahoda
parents:
diff
changeset
|
8 |
* |
ef4562cfb234
8033421: @SuppressWarnings("deprecation") does not work when overriding deprecated method
jlahoda
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
ef4562cfb234
8033421: @SuppressWarnings("deprecation") does not work when overriding deprecated method
jlahoda
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
ef4562cfb234
8033421: @SuppressWarnings("deprecation") does not work when overriding deprecated method
jlahoda
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
ef4562cfb234
8033421: @SuppressWarnings("deprecation") does not work when overriding deprecated method
jlahoda
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
ef4562cfb234
8033421: @SuppressWarnings("deprecation") does not work when overriding deprecated method
jlahoda
parents:
diff
changeset
|
13 |
* accompanied this code). |
ef4562cfb234
8033421: @SuppressWarnings("deprecation") does not work when overriding deprecated method
jlahoda
parents:
diff
changeset
|
14 |
* |
ef4562cfb234
8033421: @SuppressWarnings("deprecation") does not work when overriding deprecated method
jlahoda
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
ef4562cfb234
8033421: @SuppressWarnings("deprecation") does not work when overriding deprecated method
jlahoda
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
ef4562cfb234
8033421: @SuppressWarnings("deprecation") does not work when overriding deprecated method
jlahoda
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
ef4562cfb234
8033421: @SuppressWarnings("deprecation") does not work when overriding deprecated method
jlahoda
parents:
diff
changeset
|
18 |
* |
ef4562cfb234
8033421: @SuppressWarnings("deprecation") does not work when overriding deprecated method
jlahoda
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
ef4562cfb234
8033421: @SuppressWarnings("deprecation") does not work when overriding deprecated method
jlahoda
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
ef4562cfb234
8033421: @SuppressWarnings("deprecation") does not work when overriding deprecated method
jlahoda
parents:
diff
changeset
|
21 |
* questions. |
ef4562cfb234
8033421: @SuppressWarnings("deprecation") does not work when overriding deprecated method
jlahoda
parents:
diff
changeset
|
22 |
*/ |
ef4562cfb234
8033421: @SuppressWarnings("deprecation") does not work when overriding deprecated method
jlahoda
parents:
diff
changeset
|
23 |
|
ef4562cfb234
8033421: @SuppressWarnings("deprecation") does not work when overriding deprecated method
jlahoda
parents:
diff
changeset
|
24 |
/** |
ef4562cfb234
8033421: @SuppressWarnings("deprecation") does not work when overriding deprecated method
jlahoda
parents:
diff
changeset
|
25 |
* @test |
ef4562cfb234
8033421: @SuppressWarnings("deprecation") does not work when overriding deprecated method
jlahoda
parents:
diff
changeset
|
26 |
* @bug 8033421 |
ef4562cfb234
8033421: @SuppressWarnings("deprecation") does not work when overriding deprecated method
jlahoda
parents:
diff
changeset
|
27 |
* @summary Check that \\@SuppressWarnings works properly when overriding deprecated method. |
ef4562cfb234
8033421: @SuppressWarnings("deprecation") does not work when overriding deprecated method
jlahoda
parents:
diff
changeset
|
28 |
* @compile -Werror -Xlint:deprecation OverriddenSuppressed.java |
ef4562cfb234
8033421: @SuppressWarnings("deprecation") does not work when overriding deprecated method
jlahoda
parents:
diff
changeset
|
29 |
*/ |
ef4562cfb234
8033421: @SuppressWarnings("deprecation") does not work when overriding deprecated method
jlahoda
parents:
diff
changeset
|
30 |
|
ef4562cfb234
8033421: @SuppressWarnings("deprecation") does not work when overriding deprecated method
jlahoda
parents:
diff
changeset
|
31 |
public class OverriddenSuppressed implements Interface { |
ef4562cfb234
8033421: @SuppressWarnings("deprecation") does not work when overriding deprecated method
jlahoda
parents:
diff
changeset
|
32 |
@SuppressWarnings("deprecation") |
ef4562cfb234
8033421: @SuppressWarnings("deprecation") does not work when overriding deprecated method
jlahoda
parents:
diff
changeset
|
33 |
public void test() { } |
ef4562cfb234
8033421: @SuppressWarnings("deprecation") does not work when overriding deprecated method
jlahoda
parents:
diff
changeset
|
34 |
} |
ef4562cfb234
8033421: @SuppressWarnings("deprecation") does not work when overriding deprecated method
jlahoda
parents:
diff
changeset
|
35 |
|
ef4562cfb234
8033421: @SuppressWarnings("deprecation") does not work when overriding deprecated method
jlahoda
parents:
diff
changeset
|
36 |
interface Interface { |
ef4562cfb234
8033421: @SuppressWarnings("deprecation") does not work when overriding deprecated method
jlahoda
parents:
diff
changeset
|
37 |
@Deprecated void test(); |
ef4562cfb234
8033421: @SuppressWarnings("deprecation") does not work when overriding deprecated method
jlahoda
parents:
diff
changeset
|
38 |
} |