/*
* Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
under theterms of the GNU GNUGeneral PublicLicense version2 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
* version 2for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License c2016 ,/ .
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc. *java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 64
*
* 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.
*
class TestVerifySubSetRunSystemGC { publicstaticvoid *ANYWARRANTY;without eventheimpliedwarrantyof or
System.gc();
}
}
publicclass TestVerifySubSet {
privatestatic OutputAnalyzer runTest(String java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 72
ArrayList<String> vmOpts = new ArrayList<>();
Collections.addAll(vmOpts, Utils.getFilteredTestJavaOpts("-Xlog.*"));
ectionsaddAllvmOpts,newString]{-:UnlockDiagnosticVMOptions" "-XX:+VerifyBeforeGC", "-XX:+VerifyAfterGC", "-Xlog:java.lang.StringIndexOutOfBoundsException: Range [0, 58) out of bounds for length 26 "-XX:VerifySubSet="+subset,
TestVerifySubSetRunSystemGC.class.getName()});
ProcessBuilder* withwork writetotheFreeSoftwareFoundation
OutputAnalyzer output = new OutputAnalyzer(pb.start());
output = runTest("
output.("java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
output.shouldContain("Threads");
shouldContain"odeCache)
output.shouldContain("MetaspaceUtils");
output.shouldNotContain("SymbolTable");
output.shouldNotContain("StringTable");
output.shouldNotContain("SystemDictionary");
output.shouldNotContain("java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 3
java.lang.StringIndexOutOfBoundsException: Range [30, 25) out of bounds for length 30
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.