Remove confusing and pointless incrementing.

This commit is contained in:
Par Winzell
2009-04-27 21:21:50 +00:00
parent 9bb640f334
commit 262ef317ad
@@ -754,15 +754,15 @@ public abstract class BuildVisitor implements ExpressionVisitor<Void>
// TODO: how can we abstract this fieldless marshalling // TODO: how can we abstract this fieldless marshalling
if (value instanceof ByteEnum) { if (value instanceof ByteEnum) {
// byte enums require special conversion // byte enums require special conversion
stmt.setByte(argIx++, ((ByteEnum)value).toByte()); stmt.setByte(argIx, ((ByteEnum)value).toByte());
} else if (value instanceof int[]) { } else if (value instanceof int[]) {
// int arrays require conversion to byte arrays // int arrays require conversion to byte arrays
int[] data = (int[])value; int[] data = (int[])value;
ByteBuffer bbuf = ByteBuffer.allocate(data.length * 4); ByteBuffer bbuf = ByteBuffer.allocate(data.length * 4);
bbuf.asIntBuffer().put(data); bbuf.asIntBuffer().put(data);
stmt.setObject(argIx++, bbuf.array()); stmt.setObject(argIx, bbuf.array());
} else { } else {
stmt.setObject(argIx++, value); stmt.setObject(argIx, value);
} }
} }
}; };