Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Java/Openjdk/test/langtools/tools/javac/warnings/   (Sun/Oracle ©)  Datei vom 13.11.2022 mit Größe 1 kB image not shown  

Quelle  Deprecation.java   Sprache: JAVA

 
/**
 * @test  /nodynamiccopyright/
 * @bug 4986256 6598104 8032211 8194764
 * @compile/ref=Deprecation.noLint.out                                                   -XDrawDiagnostics Deprecation.java
 * @compile/ref=Deprecation.lintDeprecation.out  -Xlint:deprecation                      -XDrawDiagnostics Deprecation.java
 * @compile/ref=Deprecation.lintDeprecation.out  -Xlint:deprecation,-options --release 9 -XDrawDiagnostics Deprecation.java
 * @compile/ref=Deprecation.lintDeprecation8.out -Xlint:deprecation,-options --release 8 -XDrawDiagnostics Deprecation.java
 */


import java.io.StringBufferInputStream;

@Deprecated
class Deprecation
{
}

// control: this class should generate warnings
class Deprecation2
{
    void m() {
        Object d = new Deprecation();
    }
}

// tests: the warnings that would otherwise be generated should all be suppressed
@SuppressWarnings("deprecation")
class Deprecation3
{
    void m() {
        Object d = new Deprecation();
    }
}

class Deprecation4
{
    @SuppressWarnings("deprecation")
    void m() {
        Object d = new Deprecation();
    }
}

class Deprecation5
{
    void m() {
        @SuppressWarnings("deprecation")
            class Inner {
                void m() {
                    Object d = new Deprecation();
                }
            }
    }
}

// this class should produce warnings because @SuppressWarnings should not be inherited
class Deprecation6 extends Deprecation3
{
    void m() {
        Object d = new Deprecation();
    }
}

Messung V0.5
C=94 H=86 G=89

¤ Dauer der Verarbeitung: 0.15 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.