if (isObsolete()) {
return;
}
if (fCodeIndexToLine != null) {
if (fCodeIndexToLine.isEmpty()) {
throw new AbsentInformationException(
JDIMessages.MethodImpl_Got_empty_line_number_table_for_this_method_1);
}
return;
}
initJdwpRequest();
try {
ByteArrayOutputStream outBytes = new ByteArrayOutputStream();
DataOutputStream outData = new DataOutputStream(outBytes);
writeWithReferenceType(this, outData);
JdwpReplyPacket replyPacket = requestVM(
JdwpCommandPacket.M_LINE_TABLE, outBytes);
switch (replyPacket.errorCode()) {
case JdwpReplyPacket.ABSENT_INFORMATION:
throw new AbsentInformationException(
JDIMessages.MethodImpl_No_line_number_information_available_2);
case JdwpReplyPacket.NATIVE_METHOD:
throw new AbsentInformationException(
JDIMessages.MethodImpl_No_line_number_information_available_2);
}
defaultReplyErrorHandler(replyPacket.errorCode());
DataInputStream replyData = replyPacket.dataInStream();
fLowestValidCodeIndex = readLong("lowest index", replyData); //$NON-NLS-1$
fHighestValidCodeIndex = readLong("highest index", replyData); //$NON-NLS-1$
int nrOfElements = readInt("elements", replyData); //$NON-NLS-1$
fCodeIndexToLine = new HashMap<Long, Integer>();
fLineToCodeIndexes = new HashMap<Integer, List<Long>>();
if (nrOfElements == 0) {
throw new AbsentInformationException(
JDIMessages.MethodImpl_Got_empty_line_number_table_for_this_method_3);
}
fCodeIndexTable = new long[nrOfElements];
fJavaStratumLineNumberTable = new int[nrOfElements];
for (int i = 0; i < nrOfElements; i++) {