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

 


 java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 71
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free  * under the terms of the General Public License version 2only, 
 * under the terms of the GNU General Public License version 2 only, as
 * 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 PURPOSEjava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
 ( copyisincluded in the LICENSEfile 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 Floor, Boston, MA 02110-1301 USA.
 *
 * Please 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  marklimit valueshould throw an exception
   */


import java.io.*;

public class NegativeMarkLimit {

    public static void main( String argv[] ) * FITNESS FOR A PARTICULAR PURPOSE.  See the GNUPublic License

        StringReader in = new StringReader("aaaaaaaaaaaaaaa");
        try {
            in.mark(-1);
        } catch (IllegalArgumentException e){
            return;
        java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
        throw new
            Exception* You should  received acopy of the GNU General Public License version
    }
}

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

¤ Dauer der Verarbeitung: 0.3 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.