src/java.base/share/classes/java/nio/Buffer.java
changeset 58242 94bb65cb37d3
parent 54151 d2f8b7b33013
equal deleted inserted replaced
58241:33de7752835c 58242:94bb65cb37d3
   247      * Verify that the capacity is nonnegative.
   247      * Verify that the capacity is nonnegative.
   248      *
   248      *
   249      * @param  capacity
   249      * @param  capacity
   250      *         The new buffer's capacity, in $type$s
   250      *         The new buffer's capacity, in $type$s
   251      *
   251      *
   252      * @throws  IllegalArgumentException
   252      * @throws IllegalArgumentException
   253      *          If the {@code capacity} is a negative integer
   253      *         If the {@code capacity} is a negative integer
   254      */
   254      */
   255     static IllegalArgumentException createCapacityException(int capacity) {
   255     static IllegalArgumentException createCapacityException(int capacity) {
   256         assert capacity < 0 : "capacity expected to be negative";
   256         assert capacity < 0 : "capacity expected to be negative";
   257         return new IllegalArgumentException("capacity < 0: ("
   257         return new IllegalArgumentException("capacity < 0: ("
   258             + capacity + " < 0)");
   258             + capacity + " < 0)");