hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/TypeArray.java
changeset 10251 71b8938a2821
parent 5547 f4b087cbb361
child 13728 882756847a04
equal deleted inserted replaced
10250:0794cd144834 10251:71b8938a2821
    51   }
    51   }
    52 
    52 
    53   public boolean isTypeArray()         { return true; }
    53   public boolean isTypeArray()         { return true; }
    54 
    54 
    55   public byte getByteAt(long index) {
    55   public byte getByteAt(long index) {
       
    56     if (index < 0 || index >= getLength()) {
       
    57       throw new ArrayIndexOutOfBoundsException(index + " " + getLength());
       
    58     }
    56     long offset = baseOffsetInBytes(BasicType.T_BYTE) + index * getHeap().getByteSize();
    59     long offset = baseOffsetInBytes(BasicType.T_BYTE) + index * getHeap().getByteSize();
    57     return getHandle().getJByteAt(offset);
    60     return getHandle().getJByteAt(offset);
    58   }
    61   }
    59 
    62 
    60   public boolean getBooleanAt(long index) {
    63   public boolean getBooleanAt(long index) {