summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorKeith Seitz <keiths@redhat.com>2006-03-16 01:42:03 +0000
committerKeith Seitz <keiths@redhat.com>2006-03-16 01:42:03 +0000
commitaf2ef677c33bc87f66157587c89611b6bed1d4b1 (patch)
tree1ba339a411248b1fd4398e7452496f46829ac331 /gnu
parentd9af40c1af443a551d0496c302375bb80e7abbf5 (diff)
downloadclasspath-af2ef677c33bc87f66157587c89611b6bed1d4b1.tar.gz
* gnu/classpath/jdwp/util/LineTable.java (lines): Remove all occurances
of this redundant variable. (LineTable): Assert that the number of line numbers and the number of code indicies is the same.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/classpath/jdwp/util/LineTable.java21
1 files changed, 10 insertions, 11 deletions
diff --git a/gnu/classpath/jdwp/util/LineTable.java b/gnu/classpath/jdwp/util/LineTable.java
index dc4933aed..7078b17db 100644
--- a/gnu/classpath/jdwp/util/LineTable.java
+++ b/gnu/classpath/jdwp/util/LineTable.java
@@ -1,5 +1,5 @@
/* LineTable.java -- A class representing a Line Table for a method
- Copyright (C) 2005 Free Software Foundation
+ Copyright (C) 2005, 2006 Free Software Foundation
This file is part of GNU Classpath.
@@ -54,25 +54,24 @@ public class LineTable
private final long end;
private final int[] lineNum;
private final long[] lineCI;
- private final int lines;
/**
* Construct a line table with the given parameters.
*
* @param start lowest code index for method, -1 if native
* @param end highest code index for method, -1 if native
- * @param lines number of entries in line table
- * @param lineCI code indexes for entries in line tables (of length lines)
- * @param lineNum line numbers for in line tables (of length lines)
+ * @param lineNum line numbers for in line tables
+ * @param lineCI code indicies for entries in line tables
*/
- public LineTable(long start, long end, int lines, long lineCI[],
- int lineNum[])
+ public LineTable(long start, long end, int[] lineNum, long[] lineCI)
{
+ if (lineNum.length != lineCI.length)
+ throw new AssertionError("code index and line numbers tables "
+ + "not same length");
this.start = start;
this.end = end;
- this.lines = lines;
- this.lineCI = lineCI;
this.lineNum = lineNum;
+ this.lineCI = lineCI;
}
/**
@@ -86,8 +85,8 @@ public class LineTable
{
os.writeLong(start);
os.writeLong(end);
- os.writeInt(lines);
- for (int i = 0; i < lines; i++)
+ os.writeInt(lineNum.length);
+ for (int i = 0; i < lineNum.length; i++)
{
os.writeLong(lineCI[i]);
os.writeInt(lineNum[i]);