diff --git a/.hgignore b/.hgignore
deleted file mode 100644
index 7cd708362..000000000
--- a/.hgignore
+++ /dev/null
@@ -1,9 +0,0 @@
-bin/*
-lib/*
-.DS_Store
-.project
-.classpath
-.settings
-.idea
-*.iml
-target
diff --git a/.travis.yml b/.travis.yml
index 241914100..9b5e47ed6 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,7 +1,10 @@
sudo: required
dist: trusty
language: java
-jdk: oraclejdk8
+jdk:
+ - oraclejdk8
+ - oraclejdk9
+ - openjdk8
services:
- docker
cache:
@@ -16,10 +19,11 @@ after_script:
env:
matrix:
- RIAK_FLAVOR=riak-ts RIAK_DOWNLOAD_URL=docker
- - RIAK_VERSION=2.0.7 RIAK_FLAVOR=riak-kv RIAK_DOWNLOAD_URL=http://s3.amazonaws.com/downloads.basho.com/riak/2.0/2.0.7/ubuntu/trusty/riak_2.0.7-1_amd64.deb
+ # - RIAK_VERSION=2.0.8 RIAK_FLAVOR=riak-kv RIAK_DOWNLOAD_URL=http://s3.amazonaws.com/downloads.basho.com/riak/2.0/2.0.8/ubuntu/trusty/riak_2.0.8-1_amd64.deb
- RIAK_VERSION=2.2.0 RIAK_FLAVOR=riak-kv RIAK_DOWNLOAD_URL=http://s3.amazonaws.com/downloads.basho.com/riak/2.2/2.2.0/ubuntu/trusty/riak_2.2.0-1_amd64.deb
global:
- RIAK_HOSTS=localhost:8087
notifications:
slack:
secure: lCGUVnffHyrS1rpOlencvFdID7pVF2leOvbmxAKf/svkjJDLd0BWa9SgLjUDtAQ7vCa8B03rO0fWmlyynDJBQmudjytm+h8BVgAFJNm0SQOAm4ALNsWmixo4XoXhPl3rl3VmXRrx/bvLI8nA4ZIARak6RXoOXqHnl8KmkNhhxw8=
+
diff --git a/pom.xml b/pom.xml
index 67b16f469..74d39e7c4 100755
--- a/pom.xml
+++ b/pom.xml
@@ -7,9 +7,6 @@
Riak Client for Java
Java client for Riak 2.0
https://github.com/basho/riak-java-client
-
- 3.0
-
@@ -69,7 +66,7 @@
UTF-8
UTF-8
- 1.6.5
+ 2.0.0-beta.5
1.7.21
2.8.0
1.8
@@ -339,7 +336,7 @@
org.jacoco
jacoco-maven-plugin
- 0.7.7.201606060606
+ 0.8.0
jacoco-initialize
@@ -365,35 +362,10 @@
${java.target.version}
${java.target.version}
- -Werror
-Xlint:all
-
- org.apache.maven.plugins
- maven-enforcer-plugin
- 1.4.1
-
-
- enforce-property
-
- enforce
-
-
- true
-
-
- 3.0
-
-
- ${java.target.version}
-
-
-
-
-
-
org.codehaus.mojo
animal-sniffer-maven-plugin
@@ -442,15 +414,9 @@
slf4j-api
${slf4j.version}
-
- org.mockito
- mockito-core
- 1.10.19
- test
-
org.powermock
- powermock-api-mockito
+ powermock-api-mockito2
${powermock.version}
test
@@ -498,5 +464,10 @@
jinterface
1.6.1
+
+ commons-codec
+ commons-codec
+ 1.10
+
diff --git a/src/main/java/com/basho/riak/client/core/query/timeseries/Cell.java b/src/main/java/com/basho/riak/client/core/query/timeseries/Cell.java
index 53d704bee..bd3ce2800 100644
--- a/src/main/java/com/basho/riak/client/core/query/timeseries/Cell.java
+++ b/src/main/java/com/basho/riak/client/core/query/timeseries/Cell.java
@@ -4,6 +4,7 @@
import com.basho.riak.client.core.util.CharsetUtils;
import com.basho.riak.protobuf.RiakTsPB;
import com.google.protobuf.ByteString;
+import org.apache.commons.codec.binary.Hex;
import javax.xml.bind.DatatypeConverter;
import java.util.Arrays;
@@ -397,7 +398,7 @@ else if (this.hasBlob())
final int length = blobValue.length > 8 ? 8 : blobValue.length;
final byte[] blobBlurb = Arrays.copyOfRange(blobValue, 0, length);
sb.append("0x");
- sb.append(DatatypeConverter.printHexBinary(blobBlurb));
+ sb.append( Hex.encodeHex(blobBlurb ,true));
}
sb.append(" }");
diff --git a/src/test/java/com/basho/riak/client/api/commands/CreateTableTest.java b/src/test/java/com/basho/riak/client/api/commands/CreateTableTest.java
index 47fe4cb19..d4bc8708e 100644
--- a/src/test/java/com/basho/riak/client/api/commands/CreateTableTest.java
+++ b/src/test/java/com/basho/riak/client/api/commands/CreateTableTest.java
@@ -23,7 +23,7 @@
import com.basho.riak.client.core.query.timeseries.TableDefinition;
import com.basho.riak.protobuf.RiakTsPB;
import org.junit.Test;
-import org.mockito.internal.util.reflection.Whitebox;
+import org.powermock.reflect.Whitebox;
import java.util.Arrays;
import java.util.EnumSet;
diff --git a/src/test/java/com/basho/riak/client/api/commands/DeleteValueTest.java b/src/test/java/com/basho/riak/client/api/commands/DeleteValueTest.java
index 0034fdd96..30f58361f 100644
--- a/src/test/java/com/basho/riak/client/api/commands/DeleteValueTest.java
+++ b/src/test/java/com/basho/riak/client/api/commands/DeleteValueTest.java
@@ -25,7 +25,7 @@
import com.basho.riak.client.core.query.Namespace;
import com.basho.riak.protobuf.RiakKvPB;
import org.junit.Test;
-import org.mockito.internal.util.reflection.Whitebox;
+import org.powermock.reflect.Whitebox;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
diff --git a/src/test/java/com/basho/riak/client/api/commands/FetchDatatypeTest.java b/src/test/java/com/basho/riak/client/api/commands/FetchDatatypeTest.java
index 7408fba42..e3c27440c 100644
--- a/src/test/java/com/basho/riak/client/api/commands/FetchDatatypeTest.java
+++ b/src/test/java/com/basho/riak/client/api/commands/FetchDatatypeTest.java
@@ -25,7 +25,7 @@
import com.basho.riak.client.core.util.BinaryValue;
import com.basho.riak.protobuf.RiakDtPB;
import org.junit.Test;
-import org.mockito.internal.util.reflection.Whitebox;
+import org.powermock.reflect.Whitebox;
import java.util.ArrayList;
@@ -47,7 +47,7 @@ protected void setupResponse(DtFetchOperation.Response mockedResponse)
super.setupResponse(mockedResponse);
when(mockedResponse.getCrdtElement()).thenReturn(new RiakMap(new ArrayList<>()));
- when(mockedResponse.getContext()).thenReturn(BinaryValue.create(new byte[] {'1'}));
+// when(mockedResponse.getContext()).thenReturn(BinaryValue.create(new byte[] {'1'}));
}
@Test
diff --git a/src/test/java/com/basho/riak/client/api/commands/FetchValueTest.java b/src/test/java/com/basho/riak/client/api/commands/FetchValueTest.java
index bec6fe742..31e5c5c96 100644
--- a/src/test/java/com/basho/riak/client/api/commands/FetchValueTest.java
+++ b/src/test/java/com/basho/riak/client/api/commands/FetchValueTest.java
@@ -26,7 +26,7 @@
import com.basho.riak.client.core.query.RiakObject;
import com.basho.riak.protobuf.RiakKvPB;
import org.junit.Test;
-import org.mockito.internal.util.reflection.Whitebox;
+import org.powermock.reflect.Whitebox;
import java.util.ArrayList;
diff --git a/src/test/java/com/basho/riak/client/api/commands/MockedResponseOperationTest.java b/src/test/java/com/basho/riak/client/api/commands/MockedResponseOperationTest.java
index 533b21816..88f3ae058 100644
--- a/src/test/java/com/basho/riak/client/api/commands/MockedResponseOperationTest.java
+++ b/src/test/java/com/basho/riak/client/api/commands/MockedResponseOperationTest.java
@@ -50,9 +50,9 @@ public void setup() throws ExecutionException, InterruptedException, TimeoutExce
mockResponse = Mockito.mock(responseClass);
when(mockFuture.get()).thenReturn(mockResponse);
- when(mockFuture.get(anyLong(), any(TimeUnit.class))).thenReturn(mockResponse);
- when(mockFuture.isCancelled()).thenReturn(false);
- when(mockFuture.isDone()).thenReturn(true);
+// when(mockFuture.get(anyLong(), any(TimeUnit.class))).thenReturn(mockResponse);
+// when(mockFuture.isCancelled()).thenReturn(false);
+// when(mockFuture.isDone()).thenReturn(true);
setupResponse(mockedResponse());
}
diff --git a/src/test/java/com/basho/riak/client/api/commands/StoreValueTest.java b/src/test/java/com/basho/riak/client/api/commands/StoreValueTest.java
index 8548cc450..a9c601d78 100644
--- a/src/test/java/com/basho/riak/client/api/commands/StoreValueTest.java
+++ b/src/test/java/com/basho/riak/client/api/commands/StoreValueTest.java
@@ -39,7 +39,7 @@
import org.mockito.ArgumentCaptor;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
-import org.mockito.internal.util.reflection.Whitebox;
+import org.powermock.reflect.Whitebox;
import java.util.ArrayList;
import java.util.concurrent.ExecutionException;
diff --git a/src/test/java/com/basho/riak/client/api/commands/UpdateDatatypeTest.java b/src/test/java/com/basho/riak/client/api/commands/UpdateDatatypeTest.java
index 687e6777d..46339052f 100644
--- a/src/test/java/com/basho/riak/client/api/commands/UpdateDatatypeTest.java
+++ b/src/test/java/com/basho/riak/client/api/commands/UpdateDatatypeTest.java
@@ -28,7 +28,7 @@
import com.basho.riak.protobuf.RiakDtPB;
import org.junit.Test;
import org.mockito.Mock;
-import org.mockito.internal.util.reflection.Whitebox;
+import org.powermock.reflect.Whitebox;
import java.util.ArrayList;
import java.util.concurrent.ExecutionException;
@@ -52,8 +52,8 @@ protected void setupResponse(DtUpdateOperation.Response mockedResponse)
{
super.setupResponse(mockedResponse);
- when(mockedResponse.getCrdtElement()).thenReturn(new RiakMap(new ArrayList<>()));
- when(mockedResponse.getContext()).thenReturn(BinaryValue.create(new byte[] {'1'}));
+// when(mockedResponse.getCrdtElement()).thenReturn(new RiakMap(new ArrayList<>()));
+// when(mockedResponse.getContext()).thenReturn(BinaryValue.create(new byte[] {'1'}));
when(context.getValue()).thenReturn(BinaryValue.unsafeCreate(new byte[] {'1'}));
}
diff --git a/src/test/java/com/basho/riak/client/api/commands/buckets/ListBucketsTest.java b/src/test/java/com/basho/riak/client/api/commands/buckets/ListBucketsTest.java
index d1635b1c9..7e26ffd3e 100644
--- a/src/test/java/com/basho/riak/client/api/commands/buckets/ListBucketsTest.java
+++ b/src/test/java/com/basho/riak/client/api/commands/buckets/ListBucketsTest.java
@@ -15,7 +15,7 @@
import org.mockito.ArgumentCaptor;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
-import org.mockito.internal.util.reflection.Whitebox;
+import org.powermock.reflect.Whitebox;
import java.util.ArrayList;
import java.util.concurrent.TimeUnit;
diff --git a/src/test/java/com/basho/riak/client/core/DefaultNodeManagerTest.java b/src/test/java/com/basho/riak/client/core/DefaultNodeManagerTest.java
index 42c930528..6dba59ce3 100644
--- a/src/test/java/com/basho/riak/client/core/DefaultNodeManagerTest.java
+++ b/src/test/java/com/basho/riak/client/core/DefaultNodeManagerTest.java
@@ -158,12 +158,13 @@ public void addNode()
assertEquals(mockNodes.size() + 1, healthy.size());
}
- private class IsException extends ArgumentMatcher
+ private class IsException implements ArgumentMatcher