ctubbsii commented on a change in pull request #1107:
URL: https://github.com/apache/fluo/pull/1107#discussion_r506474287
##########
File path:
modules/integration-tests/src/main/java/org/apache/fluo/integration/TestUtil.java
##########
@@ -27,14 +27,14 @@ private TestUtil() {}
private static final Bytes ZERO = Bytes.of("0");
public static void increment(TransactionBase tx, Bytes row, Column col, int
val) {
- int prev = 0;
+ int prev;
String prevStr = tx.get(row, col, ZERO).toString();
prev = Integer.parseInt(prevStr);
Review comment:
```suggestion
String prevStr = tx.get(row, col, ZERO).toString();
int prev = Integer.parseInt(prevStr);
```
##########
File path:
modules/integration-tests/src/main/java/org/apache/fluo/integration/TestUtil.java
##########
@@ -27,14 +27,14 @@ private TestUtil() {}
private static final Bytes ZERO = Bytes.of("0");
public static void increment(TransactionBase tx, Bytes row, Column col, int
val) {
- int prev = 0;
+ int prev;
String prevStr = tx.get(row, col, ZERO).toString();
prev = Integer.parseInt(prevStr);
tx.set(row, col, Bytes.of(prev + val + ""));
}
public static void increment(TransactionBase tx, String row, Column col, int
val) {
- int prev = 0;
+ int prev;
String prevStr = tx.gets(row, col, "0");
prev = Integer.parseInt(prevStr);
Review comment:
```suggestion
String prevStr = tx.gets(row, col, "0");
int prev = Integer.parseInt(prevStr);
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]