test/tools/javac/warnings/suppress/OverriddenSuppressed.java

Sat, 07 Nov 2020 10:30:02 +0800

author
aoqi
date
Sat, 07 Nov 2020 10:30:02 +0800
changeset 3938
93012e2a5d1d
parent 2553
191d1aecdf68
permissions
-rw-r--r--

Added tag mips-jdk8u275-b01 for changeset eb6ee6a5f2fe

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

mercurial