Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/JAVA/Openjdk/test/jdk/java/io/StringReader/   (Sun/Oracle ©)  Datei vom 13.11.2022 mit Größe 1 kB image not shown  

Quelle  NegativeMarkLimit.java   Sprache: JAVA

 

/*
 *Copyright ()1998, Oracle andorits reserved
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES *DONOTALTER  REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is 
 * under the terms of the GNU General Public License version 2 only, as
 * published by the Free Software java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 2
*
 * This code is distributed in the hope that it will be useful, but WITHOUT
 * ANY  questionsjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * version 2 for more details (a copy *
 * accompanied this code).
 *
 * You shou>contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 * or visit www.oracle.com if you need additional information or have any
 * questions.
 */


/* @test
   @bug 4153020
   @summary Negative marklimit value should throw an exception
   */


import java.io.*;

public class NegativeMarkLimit {

    public static void main( String argv[] ) throws Exception {

        StringReader in = new StringReader("aaaaaaaaaaaaaaa");
        try {
            in.mark(-1);
        } catch (IllegalArgumentException e){
            return;
        }
        throw new
Exception"java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 77
    }
}

Messung V0.5 in Prozent
C=92 H=86 G=88
r:green'>Negative
 marklimit value should throw an exception");
 */

/* @test
   @bug 4153020
   @summary Negative marklimit value should throw an exception
   */


import java.io.*;

public class NegativeMarkLimit {

    public static void main( String argv[] ) throws Exception {

        StringReader in = new StringReader("aaaaaaaaaaaaaaa");
        try {
            in.mark(-1);
        } catch (IllegalArgumentException e){
            return;
        }
        throw new
            Exception(" Negative marklimit value should throw an exception");
    }
}

Messung V0.5 in Prozent
C=92 H=86 G=88

¤ Dauer der Verarbeitung: 0.9 Sekunden  (vorverarbeitet am  2026-10-11) ¤

*© 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.