Permalink
Browse files

Merge pull request #2 from matt-martin/master

Fixing a minor off by one error
  • Loading branch information...
2 parents f339c86 + 66d9b7c commit 6cbb40c64ee05c7db0eb0e0ecde940d3a429569a @larsgeorge committed Mar 3, 2012
@@ -151,7 +151,7 @@ public void put(String table, String[] rows, String[] fams, String[] quals,
for (String fam : fams) {
int v = 0;
for (String qual : quals) {
- String val = vals[v < vals.length ? v : vals.length];
+ String val = vals[v < vals.length ? v : vals.length - 1];
long t = ts[v < ts.length ? v : ts.length - 1];
put.add(Bytes.toBytes(fam), Bytes.toBytes(qual), t,
Bytes.toBytes(val));
@@ -142,7 +142,7 @@ public void put(String table, String[] rows, String[] fams, String[] quals,
for (String fam : fams) {
int v = 0;
for (String qual : quals) {
- String val = vals[v < vals.length ? v : vals.length];
+ String val = vals[v < vals.length ? v : vals.length - 1];
long t = ts[v < ts.length ? v : ts.length - 1];
put.add(Bytes.toBytes(fam), Bytes.toBytes(qual), t,
Bytes.toBytes(val));
@@ -142,7 +142,7 @@ public void put(String table, String[] rows, String[] fams, String[] quals,
for (String fam : fams) {
int v = 0;
for (String qual : quals) {
- String val = vals[v < vals.length ? v : vals.length];
+ String val = vals[v < vals.length ? v : vals.length - 1];
long t = ts[v < ts.length ? v : ts.length - 1];
put.add(Bytes.toBytes(fam), Bytes.toBytes(qual), t,
Bytes.toBytes(val));
@@ -142,7 +142,7 @@ public void put(String table, String[] rows, String[] fams, String[] quals,
for (String fam : fams) {
int v = 0;
for (String qual : quals) {
- String val = vals[v < vals.length ? v : vals.length];
+ String val = vals[v < vals.length ? v : vals.length - 1];
long t = ts[v < ts.length ? v : ts.length - 1];
put.add(Bytes.toBytes(fam), Bytes.toBytes(qual), t,
Bytes.toBytes(val));
@@ -142,7 +142,7 @@ public void put(String table, String[] rows, String[] fams, String[] quals,
for (String fam : fams) {
int v = 0;
for (String qual : quals) {
- String val = vals[v < vals.length ? v : vals.length];
+ String val = vals[v < vals.length ? v : vals.length - 1];
long t = ts[v < ts.length ? v : ts.length - 1];
put.add(Bytes.toBytes(fam), Bytes.toBytes(qual), t,
Bytes.toBytes(val));
@@ -151,7 +151,7 @@ public void put(String table, String[] rows, String[] fams, String[] quals,
for (String fam : fams) {
int v = 0;
for (String qual : quals) {
- String val = vals[v < vals.length ? v : vals.length];
+ String val = vals[v < vals.length ? v : vals.length - 1];
long t = ts[v < ts.length ? v : ts.length - 1];
put.add(Bytes.toBytes(fam), Bytes.toBytes(qual), t,
Bytes.toBytes(val));

0 comments on commit 6cbb40c

Please sign in to comment.