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

Commit 2c8c628

Browse files
LaunchDarklyReleaseBotember-stevensyusinto
authored
prepare 7.1.6 release (#224)
## [7.1.6] - 2023-06-22 ### Fixed: - Fix #160 null pointer exceptions on `getLastSuccessfulConnection` and `getLastFailedConnection` --------- Co-authored-by: Ember Stevens <[email protected]> Co-authored-by: Ember Stevens <[email protected]> Co-authored-by: Yusinto Ngadiman <[email protected]> Co-authored-by: Yusinto Ngadiman <[email protected]>
1 parent 80d1d9f commit 2c8c628

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
## LaunchDarkly overview
88

9-
[LaunchDarkly](https://www.launchdarkly.com) is a feature management platform that serves over 100 billion feature flags daily to help teams build better software, faster. [Get started](https://docs.launchdarkly.com/home/getting-started) using LaunchDarkly today!
9+
[LaunchDarkly](https://www.launchdarkly.com) is a feature management platform that serves trillions of feature flags daily to help teams build better software, faster. [Get started](https://docs.launchdarkly.com/home/getting-started) using LaunchDarkly today!
1010

1111
[![Twitter Follow](https://img.shields.io/twitter/follow/launchdarkly.svg?style=social&label=Follow&maxAge=2592000)](https://twitter.com/intent/follow?screen_name=launchdarkly)
1212

@@ -24,7 +24,7 @@ Refer to the [SDK documentation](https://docs.launchdarkly.com/sdk/client-side/r
2424

2525
## Learn more
2626

27-
Check out our [documentation](https://docs.launchdarkly.com) for in-depth instructions on configuring and using LaunchDarkly. You can also head straight to the [complete reference guide for this SDK](https://docs.launchdarkly.com/sdk/client-side/react/react-native).
27+
Read our [documentation](https://docs.launchdarkly.com) for in-depth instructions on configuring and using LaunchDarkly. You can also head straight to the [complete reference guide for this SDK](https://docs.launchdarkly.com/sdk/client-side/react/react-native).
2828

2929
## Testing
3030

android/src/main/java/com/launchdarkly/reactnative/LaunchdarklyReactNativeClientModule.java

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
import com.launchdarkly.sdk.android.LDConfig;
4040
import com.launchdarkly.sdk.android.LDFailure;
4141
import com.launchdarkly.sdk.android.LDStatusListener;
42-
import com.launchdarkly.sdk.android.LaunchDarklyException;
4342
import com.launchdarkly.sdk.android.integrations.ApplicationInfoBuilder;
4443
import com.launchdarkly.sdk.android.integrations.EventProcessorBuilder;
4544
import com.launchdarkly.sdk.android.integrations.HttpConfigurationBuilder;
@@ -636,7 +635,12 @@ public void getConnectionMode(String environment, Promise promise) {
636635
@ReactMethod
637636
public void getLastSuccessfulConnection(String environment, Promise promise) {
638637
try {
639-
promise.resolve(LDClient.getForMobileKey(environment).getConnectionInformation().getLastSuccessfulConnection().intValue());
638+
Long lastSuccessfulConnection = LDClient.getForMobileKey(environment).getConnectionInformation().getLastSuccessfulConnection();
639+
if (lastSuccessfulConnection != null) {
640+
promise.resolve(lastSuccessfulConnection.doubleValue());
641+
} else {
642+
promise.resolve(null);
643+
}
640644
} catch (Exception e) {
641645
Timber.w(e, "Warning: exception caught in getLastSuccessfulConnection");
642646
promise.resolve(0);
@@ -646,7 +650,13 @@ public void getLastSuccessfulConnection(String environment, Promise promise) {
646650
@ReactMethod
647651
public void getLastFailedConnection(String environment, Promise promise) {
648652
try {
649-
promise.resolve(LDClient.getForMobileKey(environment).getConnectionInformation().getLastFailedConnection().intValue());
653+
Long lastFailedConnection = LDClient.getForMobileKey(environment).getConnectionInformation().getLastFailedConnection();
654+
if (lastFailedConnection != null) {
655+
promise.resolve(lastFailedConnection.doubleValue());
656+
} else {
657+
promise.resolve(null);
658+
}
659+
650660
} catch (Exception e) {
651661
Timber.w(e, "Warning: exception caught in getLastFailedConnection");
652662
promise.resolve(0);

0 commit comments

Comments
 (0)