8202745: Remove hyphens from "out-of-bounds"

Reviewed-by: rriggs, dholmes
This commit is contained in:
Goetz Lindenmaier 2018-05-07 23:07:01 +02:00
parent ac3043c692
commit b72846bc20
10 changed files with 40 additions and 40 deletions

View file

@ -1037,7 +1037,7 @@ bool followed_by_acquire(const Node *load) {
// So first get the Proj node, mem_proj, to use it to iterate forward. // So first get the Proj node, mem_proj, to use it to iterate forward.
Node *mem_proj = NULL; Node *mem_proj = NULL;
for (DUIterator_Fast imax, i = mba->fast_outs(imax); i < imax; i++) { for (DUIterator_Fast imax, i = mba->fast_outs(imax); i < imax; i++) {
mem_proj = mba->fast_out(i); // Throw out-of-bounds if proj not found mem_proj = mba->fast_out(i); // Runs out of bounds and asserts if Proj not found.
assert(mem_proj->is_Proj(), "only projections here"); assert(mem_proj->is_Proj(), "only projections here");
ProjNode *proj = mem_proj->as_Proj(); ProjNode *proj = mem_proj->as_Proj();
if (proj->_con == TypeFunc::Memory && if (proj->_con == TypeFunc::Memory &&

View file

@ -7123,7 +7123,7 @@ size_t SweepClosure::do_blk_careful(HeapWord* addr) {
// coalesced chunk to the appropriate free list. // coalesced chunk to the appropriate free list.
if (inFreeRange()) { if (inFreeRange()) {
assert(freeFinger() >= _sp->bottom() && freeFinger() < _limit, assert(freeFinger() >= _sp->bottom() && freeFinger() < _limit,
"freeFinger() " PTR_FORMAT " is out-of-bounds", p2i(freeFinger())); "freeFinger() " PTR_FORMAT " is out of bounds", p2i(freeFinger()));
flush_cur_free_chunk(freeFinger(), flush_cur_free_chunk(freeFinger(),
pointer_delta(addr, freeFinger())); pointer_delta(addr, freeFinger()));
log_develop_trace(gc, sweep)("Sweep: last chunk: put_free_blk " PTR_FORMAT " (" SIZE_FORMAT ") [coalesced:%d]", log_develop_trace(gc, sweep)("Sweep: last chunk: put_free_blk " PTR_FORMAT " (" SIZE_FORMAT ") [coalesced:%d]",

View file

@ -64,7 +64,7 @@ inline HeapWord* G1Allocator::attempt_allocation_force(size_t word_size) {
inline PLAB* G1PLABAllocator::alloc_buffer(InCSetState dest) { inline PLAB* G1PLABAllocator::alloc_buffer(InCSetState dest) {
assert(dest.is_valid(), assert(dest.is_valid(),
"Allocation buffer index out-of-bounds: " CSETSTATE_FORMAT, dest.value()); "Allocation buffer index out of bounds: " CSETSTATE_FORMAT, dest.value());
assert(_alloc_buffers[dest.value()] != NULL, assert(_alloc_buffers[dest.value()] != NULL,
"Allocation buffer is NULL: " CSETSTATE_FORMAT, dest.value()); "Allocation buffer is NULL: " CSETSTATE_FORMAT, dest.value());
return _alloc_buffers[dest.value()]; return _alloc_buffers[dest.value()];

View file

@ -293,7 +293,7 @@ bool PSMarkSweep::invoke_no_policy(bool clear_all_softrefs) {
assert(young_gen->max_size() > assert(young_gen->max_size() >
young_gen->from_space()->capacity_in_bytes() + young_gen->from_space()->capacity_in_bytes() +
young_gen->to_space()->capacity_in_bytes(), young_gen->to_space()->capacity_in_bytes(),
"Sizes of space in young gen are out-of-bounds"); "Sizes of space in young gen are out of bounds");
size_t young_live = young_gen->used_in_bytes(); size_t young_live = young_gen->used_in_bytes();
size_t eden_live = young_gen->eden_space()->used_in_bytes(); size_t eden_live = young_gen->eden_space()->used_in_bytes();

View file

@ -790,7 +790,7 @@ inline DiscoveredList* ReferenceProcessor::get_discovered_list(ReferenceType rt)
id = next_id(); id = next_id();
} }
} }
assert(id < _max_num_queues, "Id is out-of-bounds id %u and max id %u)", id, _max_num_queues); assert(id < _max_num_queues, "Id is out of bounds id %u and max id %u)", id, _max_num_queues);
// Get the discovered queue to which we will add // Get the discovered queue to which we will add
DiscoveredList* list = NULL; DiscoveredList* list = NULL;

View file

@ -35,16 +35,16 @@ import java.util.function.Supplier;
* on objects, or checking certain conditions before operation. These utilities * on objects, or checking certain conditions before operation. These utilities
* include {@code null}-safe or {@code null}-tolerant methods for computing the * include {@code null}-safe or {@code null}-tolerant methods for computing the
* hash code of an object, returning a string for an object, comparing two * hash code of an object, returning a string for an object, comparing two
* objects, and checking if indexes or sub-range values are out-of-bounds. * objects, and checking if indexes or sub-range values are out of bounds.
* *
* @apiNote * @apiNote
* Static methods such as {@link Objects#checkIndex}, * Static methods such as {@link Objects#checkIndex},
* {@link Objects#checkFromToIndex}, and {@link Objects#checkFromIndexSize} are * {@link Objects#checkFromToIndex}, and {@link Objects#checkFromIndexSize} are
* provided for the convenience of checking if values corresponding to indexes * provided for the convenience of checking if values corresponding to indexes
* and sub-ranges are out-of-bounds. * and sub-ranges are out of bounds.
* Variations of these static methods support customization of the runtime * Variations of these static methods support customization of the runtime
* exception, and corresponding exception detail message, that is thrown when * exception, and corresponding exception detail message, that is thrown when
* values are out-of-bounds. Such methods accept a functional interface * values are out of bounds. Such methods accept a functional interface
* argument, instances of {@code BiFunction}, that maps out-of-bound values to a * argument, instances of {@code BiFunction}, that maps out-of-bound values to a
* runtime exception. Care should be taken when using such methods in * runtime exception. Care should be taken when using such methods in
* combination with an argument that is a lambda expression, method reference or * combination with an argument that is a lambda expression, method reference or
@ -352,7 +352,7 @@ public final class Objects {
* Checks if the {@code index} is within the bounds of the range from * Checks if the {@code index} is within the bounds of the range from
* {@code 0} (inclusive) to {@code length} (exclusive). * {@code 0} (inclusive) to {@code length} (exclusive).
* *
* <p>The {@code index} is defined to be out-of-bounds if any of the * <p>The {@code index} is defined to be out of bounds if any of the
* following inequalities is true: * following inequalities is true:
* <ul> * <ul>
* <li>{@code index < 0}</li> * <li>{@code index < 0}</li>
@ -363,7 +363,7 @@ public final class Objects {
* @param index the index * @param index the index
* @param length the upper-bound (exclusive) of the range * @param length the upper-bound (exclusive) of the range
* @return {@code index} if it is within bounds of the range * @return {@code index} if it is within bounds of the range
* @throws IndexOutOfBoundsException if the {@code index} is out-of-bounds * @throws IndexOutOfBoundsException if the {@code index} is out of bounds
* @since 9 * @since 9
*/ */
@ForceInline @ForceInline
@ -377,7 +377,7 @@ public final class Objects {
* {@code toIndex} (exclusive) is within the bounds of range from {@code 0} * {@code toIndex} (exclusive) is within the bounds of range from {@code 0}
* (inclusive) to {@code length} (exclusive). * (inclusive) to {@code length} (exclusive).
* *
* <p>The sub-range is defined to be out-of-bounds if any of the following * <p>The sub-range is defined to be out of bounds if any of the following
* inequalities is true: * inequalities is true:
* <ul> * <ul>
* <li>{@code fromIndex < 0}</li> * <li>{@code fromIndex < 0}</li>
@ -390,7 +390,7 @@ public final class Objects {
* @param toIndex the upper-bound (exclusive) of the sub-range * @param toIndex the upper-bound (exclusive) of the sub-range
* @param length the upper-bound (exclusive) the range * @param length the upper-bound (exclusive) the range
* @return {@code fromIndex} if the sub-range within bounds of the range * @return {@code fromIndex} if the sub-range within bounds of the range
* @throws IndexOutOfBoundsException if the sub-range is out-of-bounds * @throws IndexOutOfBoundsException if the sub-range is out of bounds
* @since 9 * @since 9
*/ */
public static public static
@ -403,7 +403,7 @@ public final class Objects {
* {@code fromIndex + size} (exclusive) is within the bounds of range from * {@code fromIndex + size} (exclusive) is within the bounds of range from
* {@code 0} (inclusive) to {@code length} (exclusive). * {@code 0} (inclusive) to {@code length} (exclusive).
* *
* <p>The sub-range is defined to be out-of-bounds if any of the following * <p>The sub-range is defined to be out of bounds if any of the following
* inequalities is true: * inequalities is true:
* <ul> * <ul>
* <li>{@code fromIndex < 0}</li> * <li>{@code fromIndex < 0}</li>
@ -416,7 +416,7 @@ public final class Objects {
* @param size the size of the sub-range * @param size the size of the sub-range
* @param length the upper-bound (exclusive) of the range * @param length the upper-bound (exclusive) of the range
* @return {@code fromIndex} if the sub-range within bounds of the range * @return {@code fromIndex} if the sub-range within bounds of the range
* @throws IndexOutOfBoundsException if the sub-range is out-of-bounds * @throws IndexOutOfBoundsException if the sub-range is out of bounds
* @since 9 * @since 9
*/ */
public static public static

View file

@ -185,13 +185,13 @@ public class Preconditions {
// Switch to default if fewer or more arguments than required are supplied // Switch to default if fewer or more arguments than required are supplied
switch ((args.size() != argSize) ? "" : checkKind) { switch ((args.size() != argSize) ? "" : checkKind) {
case "checkIndex": case "checkIndex":
return String.format("Index %d out-of-bounds for length %d", return String.format("Index %d out of bounds for length %d",
args.get(0), args.get(1)); args.get(0), args.get(1));
case "checkFromToIndex": case "checkFromToIndex":
return String.format("Range [%d, %d) out-of-bounds for length %d", return String.format("Range [%d, %d) out of bounds for length %d",
args.get(0), args.get(1), args.get(2)); args.get(0), args.get(1), args.get(2));
case "checkFromIndexSize": case "checkFromIndexSize":
return String.format("Range [%d, %<d + %d) out-of-bounds for length %d", return String.format("Range [%d, %<d + %d) out of bounds for length %d",
args.get(0), args.get(1), args.get(2)); args.get(0), args.get(1), args.get(2));
default: default:
return String.format("Range check failed: %s %s", checkKind, args); return String.format("Range check failed: %s %s", checkKind, args);
@ -202,7 +202,7 @@ public class Preconditions {
* Checks if the {@code index} is within the bounds of the range from * Checks if the {@code index} is within the bounds of the range from
* {@code 0} (inclusive) to {@code length} (exclusive). * {@code 0} (inclusive) to {@code length} (exclusive).
* *
* <p>The {@code index} is defined to be out-of-bounds if any of the * <p>The {@code index} is defined to be out of bounds if any of the
* following inequalities is true: * following inequalities is true:
* <ul> * <ul>
* <li>{@code index < 0}</li> * <li>{@code index < 0}</li>
@ -210,14 +210,14 @@ public class Preconditions {
* <li>{@code length < 0}, which is implied from the former inequalities</li> * <li>{@code length < 0}, which is implied from the former inequalities</li>
* </ul> * </ul>
* *
* <p>If the {@code index} is out-of-bounds, then a runtime exception is * <p>If the {@code index} is out of bounds, then a runtime exception is
* thrown that is the result of applying the following arguments to the * thrown that is the result of applying the following arguments to the
* exception formatter: the name of this method, {@code checkIndex}; * exception formatter: the name of this method, {@code checkIndex};
* and an unmodifiable list integers whose values are, in order, the * and an unmodifiable list integers whose values are, in order, the
* out-of-bounds arguments {@code index} and {@code length}. * out-of-bounds arguments {@code index} and {@code length}.
* *
* @param <X> the type of runtime exception to throw if the arguments are * @param <X> the type of runtime exception to throw if the arguments are
* out-of-bounds * out of bounds
* @param index the index * @param index the index
* @param length the upper-bound (exclusive) of the range * @param length the upper-bound (exclusive) of the range
* @param oobef the exception formatter that when applied with this * @param oobef the exception formatter that when applied with this
@ -228,9 +228,9 @@ public class Preconditions {
* instead (though it may be more efficient). * instead (though it may be more efficient).
* Exceptions thrown by the formatter are relayed to the caller. * Exceptions thrown by the formatter are relayed to the caller.
* @return {@code index} if it is within bounds of the range * @return {@code index} if it is within bounds of the range
* @throws X if the {@code index} is out-of-bounds and the exception * @throws X if the {@code index} is out of bounds and the exception
* formatter is non-{@code null} * formatter is non-{@code null}
* @throws IndexOutOfBoundsException if the {@code index} is out-of-bounds * @throws IndexOutOfBoundsException if the {@code index} is out of bounds
* and the exception formatter is {@code null} * and the exception formatter is {@code null}
* @since 9 * @since 9
* *
@ -254,7 +254,7 @@ public class Preconditions {
* {@code toIndex} (exclusive) is within the bounds of range from {@code 0} * {@code toIndex} (exclusive) is within the bounds of range from {@code 0}
* (inclusive) to {@code length} (exclusive). * (inclusive) to {@code length} (exclusive).
* *
* <p>The sub-range is defined to be out-of-bounds if any of the following * <p>The sub-range is defined to be out of bounds if any of the following
* inequalities is true: * inequalities is true:
* <ul> * <ul>
* <li>{@code fromIndex < 0}</li> * <li>{@code fromIndex < 0}</li>
@ -263,14 +263,14 @@ public class Preconditions {
* <li>{@code length < 0}, which is implied from the former inequalities</li> * <li>{@code length < 0}, which is implied from the former inequalities</li>
* </ul> * </ul>
* *
* <p>If the sub-range is out-of-bounds, then a runtime exception is * <p>If the sub-range is out of bounds, then a runtime exception is
* thrown that is the result of applying the following arguments to the * thrown that is the result of applying the following arguments to the
* exception formatter: the name of this method, {@code checkFromToIndex}; * exception formatter: the name of this method, {@code checkFromToIndex};
* and an unmodifiable list integers whose values are, in order, the * and an unmodifiable list integers whose values are, in order, the
* out-of-bounds arguments {@code fromIndex}, {@code toIndex}, and {@code length}. * out-of-bounds arguments {@code fromIndex}, {@code toIndex}, and {@code length}.
* *
* @param <X> the type of runtime exception to throw if the arguments are * @param <X> the type of runtime exception to throw if the arguments are
* out-of-bounds * out of bounds
* @param fromIndex the lower-bound (inclusive) of the sub-range * @param fromIndex the lower-bound (inclusive) of the sub-range
* @param toIndex the upper-bound (exclusive) of the sub-range * @param toIndex the upper-bound (exclusive) of the sub-range
* @param length the upper-bound (exclusive) the range * @param length the upper-bound (exclusive) the range
@ -282,9 +282,9 @@ public class Preconditions {
* instead (though it may be more efficient). * instead (though it may be more efficient).
* Exceptions thrown by the formatter are relayed to the caller. * Exceptions thrown by the formatter are relayed to the caller.
* @return {@code fromIndex} if the sub-range within bounds of the range * @return {@code fromIndex} if the sub-range within bounds of the range
* @throws X if the sub-range is out-of-bounds and the exception factory * @throws X if the sub-range is out of bounds and the exception factory
* function is non-{@code null} * function is non-{@code null}
* @throws IndexOutOfBoundsException if the sub-range is out-of-bounds and * @throws IndexOutOfBoundsException if the sub-range is out of bounds and
* the exception factory function is {@code null} * the exception factory function is {@code null}
* @since 9 * @since 9
*/ */
@ -301,7 +301,7 @@ public class Preconditions {
* {@code fromIndex + size} (exclusive) is within the bounds of range from * {@code fromIndex + size} (exclusive) is within the bounds of range from
* {@code 0} (inclusive) to {@code length} (exclusive). * {@code 0} (inclusive) to {@code length} (exclusive).
* *
* <p>The sub-range is defined to be out-of-bounds if any of the following * <p>The sub-range is defined to be out of bounds if any of the following
* inequalities is true: * inequalities is true:
* <ul> * <ul>
* <li>{@code fromIndex < 0}</li> * <li>{@code fromIndex < 0}</li>
@ -310,7 +310,7 @@ public class Preconditions {
* <li>{@code length < 0}, which is implied from the former inequalities</li> * <li>{@code length < 0}, which is implied from the former inequalities</li>
* </ul> * </ul>
* *
* <p>If the sub-range is out-of-bounds, then a runtime exception is * <p>If the sub-range is out of bounds, then a runtime exception is
* thrown that is the result of applying the following arguments to the * thrown that is the result of applying the following arguments to the
* exception formatter: the name of this method, {@code checkFromIndexSize}; * exception formatter: the name of this method, {@code checkFromIndexSize};
* and an unmodifiable list integers whose values are, in order, the * and an unmodifiable list integers whose values are, in order, the
@ -318,7 +318,7 @@ public class Preconditions {
* {@code length}. * {@code length}.
* *
* @param <X> the type of runtime exception to throw if the arguments are * @param <X> the type of runtime exception to throw if the arguments are
* out-of-bounds * out of bounds
* @param fromIndex the lower-bound (inclusive) of the sub-interval * @param fromIndex the lower-bound (inclusive) of the sub-interval
* @param size the size of the sub-range * @param size the size of the sub-range
* @param length the upper-bound (exclusive) of the range * @param length the upper-bound (exclusive) of the range
@ -330,9 +330,9 @@ public class Preconditions {
* instead (though it may be more efficient). * instead (though it may be more efficient).
* Exceptions thrown by the formatter are relayed to the caller. * Exceptions thrown by the formatter are relayed to the caller.
* @return {@code fromIndex} if the sub-range within bounds of the range * @return {@code fromIndex} if the sub-range within bounds of the range
* @throws X if the sub-range is out-of-bounds and the exception factory * @throws X if the sub-range is out of bounds and the exception factory
* function is non-{@code null} * function is non-{@code null}
* @throws IndexOutOfBoundsException if the sub-range is out-of-bounds and * @throws IndexOutOfBoundsException if the sub-range is out of bounds and
* the exception factory function is {@code null} * the exception factory function is {@code null}
* @since 9 * @since 9
*/ */

View file

@ -1243,7 +1243,7 @@ public class ImageWriteParam extends IIOParam {
throw new IllegalStateException("No compression type set!"); throw new IllegalStateException("No compression type set!");
} }
if (quality < 0.0F || quality > 1.0F) { if (quality < 0.0F || quality > 1.0F) {
throw new IllegalArgumentException("Quality out-of-bounds!"); throw new IllegalArgumentException("Quality out of bounds!");
} }
this.compressionQuality = quality; this.compressionQuality = quality;
} }
@ -1341,7 +1341,7 @@ public class ImageWriteParam extends IIOParam {
throw new IllegalStateException("No compression type set!"); throw new IllegalStateException("No compression type set!");
} }
if (quality < 0.0F || quality > 1.0F) { if (quality < 0.0F || quality > 1.0F) {
throw new IllegalArgumentException("Quality out-of-bounds!"); throw new IllegalArgumentException("Quality out of bounds!");
} }
return -1.0F; return -1.0F;
} }

View file

@ -598,7 +598,7 @@ public abstract class HttpRequest {
* @param length the number of bytes to use * @param length the number of bytes to use
* @return a BodyPublisher * @return a BodyPublisher
* @throws IndexOutOfBoundsException if the sub-range is defined to be * @throws IndexOutOfBoundsException if the sub-range is defined to be
* out-of-bounds * out of bounds
*/ */
public static BodyPublisher ofByteArray(byte[] buf, int offset, int length) { public static BodyPublisher ofByteArray(byte[] buf, int offset, int length) {
Objects.checkFromIndexSize(offset, length, buf.length); Objects.checkFromIndexSize(offset, length, buf.length);

View file

@ -94,7 +94,7 @@ class VerifyErrorCases {
"Bad type on operand stack"), "Bad type on operand stack"),
new Case("case02", "stackMapFrame.cpp", true, "get_local", new Case("case02", "stackMapFrame.cpp", true, "get_local",
"local index out-of-bounds", "local index out of bounds",
"Local variable table overflow"), "Local variable table overflow"),
new Case("case03", "stackMapFrame.cpp", true, "get_local", new Case("case03", "stackMapFrame.cpp", true, "get_local",
@ -102,7 +102,7 @@ class VerifyErrorCases {
"Bad local variable type"), "Bad local variable type"),
new Case("case04", "stackMapFrame.cpp", true, "get_local_2", new Case("case04", "stackMapFrame.cpp", true, "get_local_2",
"local index out-of-bounds [type2]", "local index out of bounds [type2]",
"get long/double overflows locals"), "get long/double overflows locals"),
new Case("case05", "stackMapFrame.cpp", true, "get_local_2", new Case("case05", "stackMapFrame.cpp", true, "get_local_2",
@ -115,11 +115,11 @@ class VerifyErrorCases {
"Bad local variable type"), "Bad local variable type"),
new Case("case07", "stackMapFrame.cpp", true, "set_local", new Case("case07", "stackMapFrame.cpp", true, "set_local",
"local index out-of-bounds", "local index out of bounds",
"Local variable table overflow"), "Local variable table overflow"),
new Case("case08", "stackMapFrame.cpp", true, "set_local_2", new Case("case08", "stackMapFrame.cpp", true, "set_local_2",
"local index out-of-bounds [type2]", "local index out of bounds [type2]",
"Local variable table overflow"), "Local variable table overflow"),
new Case("case09", "stackMapFrame.hpp", true, "push_stack", new Case("case09", "stackMapFrame.hpp", true, "push_stack",
@ -322,7 +322,7 @@ class VerifyErrorCases {
"Stack map does not match the one at exception handler "), "Stack map does not match the one at exception handler "),
new Case("case54", "verifier.cpp", true, "verify_cp_index", new Case("case54", "verifier.cpp", true, "verify_cp_index",
"constant pool index is out-of-bounds", "constant pool index is out of bounds",
"Illegal constant pool index "), "Illegal constant pool index "),
new Case("case55", "verifier.cpp", true, "verify_cp_type", new Case("case55", "verifier.cpp", true, "verify_cp_type",