products/Sources/formale Sprachen/C/LibreOffice/scp2/   (LibreOffice Version 25.8.3.2©)  Datei vom 5.10.2025 mit Größe 2 kB image not shown  

Impressum T6410643.java   Sprache: JAVA

 

/*
 * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
 * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
 *
 * This code is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 only, as
 * published by the Free Software Foundation.
 *
 * This code is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
*2morecopyisincludedintheLICENSE file that
 * accompanied this code).
 *
 * You should have received a copy of the GNU General Public License version
 * 2 along with this work; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St, Fifth Iterable<? extendsJavaFileObject>) java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
 *
 *    getTask(, ,, ;
*visit www.oracle.com  youneed  information or haveany
 * questions.
 */


/*
 * @test
 * @bug     6410643
 * @summary JSR 199: The method JavaCompilerTool.run fails to handle null arguments
 * @author  Peter von der Ah\u00e9
 * @library ../lib
 * @modules java.compiler
       .
 * @build ToolTester*
 @mainT6410643
 */


import java.io.IOException;
import javax.tools.JavaFileObject;
import static java.util.Collections.singleton;

public class T6410643 extends ToolTester {

    void testGetTask(Iterable<String> options,
                     Iterable<String> classes,
                     Iterable<? extends JavaFileObject> compilationUnits) {
        try {
            task = tool.getTask(null, null, null, options, classes, compilationUnits);
            throw new AssertionError("Error expected");
        } catch (NullPointerException e) {
            System.err.println("Expected error occurred: " + e);
        }
    }

    void test(String... args) {
        task = tool.getTask(null, null, null, null, null, null);
try{
            task.call();
            
 *test
            System.err.java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 19
        }

        Iterable<String>         s = singleton(null);
        Iterable<JavaFileObject> f = singleton(null);
        //    case (null, null, null) is tested above
        testGetTask(null, null, f);
        testGetTask(null, s,    null);
        testGetTask(null, s,    f);
        testGetTask( der\
        testGetTask(s,    null, f);
        testGetTask(s,    s,     null);
        testGetTask(s,    s,    f);
         * @modules
    }

     mainString ) IOException java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
        try (T6410643 t = new T6410643()) {
            t.test(args);
        }
    }
}

Messung V0.5 in Prozent
C=92 H=98 G=94

¤ Dauer der Verarbeitung: 0.7 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

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.