Skip to content

Commit

Permalink
FMWK-215 Update Java client to 7.0.0 (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
agrgr authored Aug 8, 2023
1 parent 9bcce57 commit de87d5f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<maven.gpg.plugin.version>1.6</maven.gpg.plugin.version>
<maven-surefire-plugin.version>3.0.0-M7</maven-surefire-plugin.version>
<jackson-databind.version>2.14.1</jackson-databind.version>
<aerospike-client.version>6.1.6</aerospike-client.version>
<aerospike-client.version>7.0.0</aerospike-client.version>
<json-path.version>2.7.0</json-path.version>
<lombok.version>1.18.24</lombok.version>
<junit-jupiter.version>5.9.2</junit-jupiter.version>
Expand Down
9 changes: 2 additions & 7 deletions src/main/java/com/aerospike/documentapi/util/Utils.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.aerospike.documentapi.util;

import com.aerospike.client.Bin;
import com.aerospike.client.Value;
import com.aerospike.client.cdt.CTX;
import com.aerospike.client.cdt.MapOrder;
import com.aerospike.documentapi.jsonpath.JsonPathObject;
import com.aerospike.documentapi.jsonpath.JsonPathParser;
import com.aerospike.documentapi.jsonpath.PathDetails;
Expand All @@ -11,7 +11,6 @@
import lombok.experimental.UtilityClass;

import java.util.List;
import java.util.Map;

@UtilityClass
public class Utils {
Expand All @@ -25,11 +24,7 @@ public static Bin createBinByJsonNodeType(String binName, JsonNode jsonNode) {
}

public static Bin createBin(String binName, Object jsonObject) {
if (jsonObject instanceof Map) {
return new Bin(binName, (Map<?, ?>) jsonObject, MapOrder.KEY_ORDERED);
} else {
return new Bin(binName, jsonObject);
}
return new Bin(binName, Value.get(jsonObject));
}

public static void validateNotArray(Object object) throws IllegalArgumentException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,9 +325,12 @@ void testNegativeBatchPut() {
assertTrue(results.stream().anyMatch(res -> res.resultCode != ResultCode.OK));

// making sure all records contain the resulting record == null and the necessary resulting code
// OP_NOT_APPLICABLE = 26, PARAMETER_ERROR = 4
batchOpsList.forEach(batchOp -> assertTrue(batchOp.getBatchRecord().record == null
&& (batchOp.getBatchRecord().resultCode == 26 || batchOp.getBatchRecord().resultCode == 4)));
// OP_NOT_APPLICABLE = 26, PARAMETER_ERROR = 4, BIN_TYPE_ERROR = 12
batchOpsList.forEach(batchOp -> {
BatchRecord batchRecord = batchOp.getBatchRecord();
assertTrue(batchRecord.record == null
&& (batchRecord.resultCode == 26 || batchRecord.resultCode == 4 || batchRecord.resultCode == 12));
});
}

/**
Expand Down

0 comments on commit de87d5f

Please sign in to comment.