Skip to content

Commit c838320

Browse files
committed
updated guava version and streaming service url
1 parent 7d093df commit c838320

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

client/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
<dependency>
122122
<groupId>com.google.guava</groupId>
123123
<artifactId>guava</artifactId>
124-
<version>18.0</version>
124+
<version>29.0-jre</version>
125125
</dependency>
126126
<dependency>
127127
<groupId>org.slf4j</groupId>

client/src/main/java/io/split/client/SplitClientConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ public static final class Builder {
275275
private int _authRetryBackoffBase = 1;
276276
private int _streamingReconnectBackoffBase = 1;
277277
private String _authServiceURL = "https://auth.split.io/api/auth";
278-
private String _streamingServiceURL = "https://streaming.split.io/event-stream";
278+
private String _streamingServiceURL = "https://streaming.split.io/sse";
279279

280280
public Builder() {
281281
}

client/src/main/java/io/split/engine/sse/client/SSEClient.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package io.split.engine.sse.client;
22

3+
import com.google.common.base.Strings;
34
import org.apache.http.client.config.RequestConfig;
45
import org.apache.http.client.methods.CloseableHttpResponse;
56
import org.apache.http.client.methods.HttpGet;
@@ -130,7 +131,7 @@ private void connectAndLoop(URI uri, CountDownLatch signal) {
130131

131132
private boolean establishConnection(URI uri, CountDownLatch signal) {
132133
HttpGet request = new HttpGet(uri);
133-
request.addHeader("Content-Type","text/event-stream");
134+
134135
try {
135136
_ongoingResponse.set(_client.execute(request));
136137
if (_ongoingResponse.get().getStatusLine().getStatusCode() != 200) {

client/src/test/java/io/split/engine/splitter/HashConsistencyTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package io.split.engine.splitter;
22

3+
import com.google.common.base.Charsets;
34
import com.google.common.hash.Hashing;
45
import io.split.client.utils.MurmurHash3;
56
import org.junit.Assert;
@@ -118,7 +119,7 @@ private void validateFileGuavaMurmur3Hash(File file) throws IOException {
118119
long expected_hash = Long.parseLong(parts[2]);
119120
int expected_bucket = Integer.parseInt(parts[3]);
120121

121-
int hash = Hashing.murmur3_32(seed).hashString(key, Charset.forName("UTF-8")).asInt();
122+
int hash = Hashing.murmur3_32(seed).hashBytes(key.getBytes(Charsets.UTF_8)).asInt();
122123

123124
int bucket = Splitter.bucket(hash);
124125

0 commit comments

Comments
 (0)