Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.

Commit ad1611a

Browse files
authored
prepare 4.2.1 release (#131)
1 parent fa753fe commit ad1611a

File tree

6 files changed

+22
-0
lines changed

6 files changed

+22
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ LaunchDarkly SDK for Java
55
[![Javadocs](http://javadoc.io/badge/com.launchdarkly/launchdarkly-client.svg)](http://javadoc.io/doc/com.launchdarkly/launchdarkly-client)
66
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Flaunchdarkly%2Fjava-client.svg?type=shield)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Flaunchdarkly%2Fjava-client?ref=badge_shield)
77

8+
Supported Java versions
9+
-----------------------
10+
11+
This version of the LaunchDarkly SDK works with Java 7 and above.
12+
813
Quick setup
914
-----------
1015

src/main/java/com/launchdarkly/client/RedisFeatureStore.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ private <T extends VersionedData> void updateItemWithVersioning(VersionedDataKin
259259
if (cache != null) {
260260
cache.invalidate(new CacheKey(kind, newItem.getKey()));
261261
}
262+
return;
262263
} finally {
263264
if (jedis != null) {
264265
jedis.unwatch();

src/main/java/com/launchdarkly/client/Util.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ static Request.Builder getRequestBuilder(String sdkKey) {
4141
static boolean isHttpErrorRecoverable(int statusCode) {
4242
if (statusCode >= 400 && statusCode < 500) {
4343
switch (statusCode) {
44+
case 400: // bad request
4445
case 408: // request timeout
4546
case 429: // too many requests
4647
return true;

src/test/java/com/launchdarkly/client/DefaultEventProcessorTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,11 @@ public void sdkKeyIsSent() throws Exception {
391391
assertThat(req.getHeader("Authorization"), equalTo(SDK_KEY));
392392
}
393393

394+
@Test
395+
public void http400ErrorIsRecoverable() throws Exception {
396+
testRecoverableHttpError(400);
397+
}
398+
394399
@Test
395400
public void http401ErrorIsUnrecoverable() throws Exception {
396401
testUnrecoverableHttpError(401);

src/test/java/com/launchdarkly/client/PollingProcessorTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ public void testConnectionProblem() throws Exception {
5353
pollingProcessor.close();
5454
verifyAll();
5555
}
56+
57+
@Test
58+
public void http400ErrorIsRecoverable() throws Exception {
59+
testRecoverableHttpError(400);
60+
}
5661

5762
@Test
5863
public void http401ErrorIsUnrecoverable() throws Exception {

src/test/java/com/launchdarkly/client/StreamProcessorTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,11 @@ public void streamWillReconnectAfterGeneralIOException() throws Exception {
282282
ConnectionErrorHandler.Action action = errorHandler.onConnectionError(new IOException());
283283
assertEquals(ConnectionErrorHandler.Action.PROCEED, action);
284284
}
285+
286+
@Test
287+
public void http400ErrorIsRecoverable() throws Exception {
288+
testRecoverableHttpError(400);
289+
}
285290

286291
@Test
287292
public void http401ErrorIsUnrecoverable() throws Exception {

0 commit comments

Comments
 (0)