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

Conversation

@LaunchDarklyCI
Copy link
Contributor

[4.9.0] - 2019-10-17

This release adds the LDValue class (in com.launchdarkly.client.value), which is a new abstraction for all of the data types supported by the LaunchDarkly platform. Since those are the same as the JSON data types, the SDK previously used the Gson classes JsonElement, JsonObject, etc. to represent them. This caused two problems: the public APIs are dependent on Gson, and the Gson object and array types are mutable so it was possible to accidentally modify values that are being used elsewhere in the SDK.

While the SDK still uses Gson internally, all references to Gson types in the API are now deprecated in favor of equivalent APIs that use LDValue. Developers are encouraged to migrate toward these as soon as possible; the Gson classes will be removed from the API in a future major version. If you are only using primitive types (boolean, string, etc.) for your feature flags and user attributes, then no changes are required.

There are no other changes in this release.

Added:

  • LDValue (see above).
  • The new jsonValueVariation and jsonValueVariationDetail methods in LDClient/LDClientInterface are equivalent to JsonVariation and JsonVariationDetail, but use LDValue.

Deprecated:

  • In LDClient/LDClientInterface: jsonVariation/jsonVariationDetail. Use jsonValueVariation/jsonValueVariationDetail.
  • In LDClient/LDClientInterface: track(String, LDUser, JsonElement) and track(String, LDUser, JsonElement, double). Use trackData(String, LDUser, LDValue) and trackMetric(String, LDUser, LDValue, double). The names are different to avoid compile-time ambiguity since both JsonElement and LDValue are nullable types.
  • In LDUserBuilder: custom(String, JsonElement) and privateCustom(String, JsonElement). Use the LDValue overloads.
  • In LDValue: fromJsonElement, unsafeFromJsonElement, asJsonElement, asUnsafeJsonElement. These are provided for compatibility with code that still uses JsonElement, but will be removed in a future major version.

eli-darkly and others added 30 commits August 24, 2018 17:36
avoid some inappropriate uses of Guava's ImmutableMap
…easons

# Conflicts:
#	src/main/java/com/launchdarkly/client/FeatureFlagsState.java
don't keep evaluating prerequisites if one fails
add tests for JSON serialization of evaluation reasons
…ith-reasons

evaluation reasons can be included in allFlagsState()
make LDUser serialize correctly as JSON and add more test coverage
preserve prerequisite flag value in event even if flag was off
more test coverage for requesting values of different types
new option for sending less bootstrap data based on event tracking status
fix build so jar signatures will be published
# Conflicts:
#	packaging-test/Makefile
add LDValue type and deprecate use of JsonElement
…tric

restore previously existing track() overload
fix NewRelic reflection logic to avoid shading
better exceptions for null params
…ent-and-proxy

apply proxy settings to stream, and manage HTTP clients better
# Conflicts:
#	src/test/java/com/launchdarkly/client/UtilTest.java
@LaunchDarklyCI LaunchDarklyCI merged commit 0946b65 into master Oct 18, 2019
@LaunchDarklyCI LaunchDarklyCI deleted the release-4.9.0 branch October 18, 2019 19:33
eli-darkly added a commit that referenced this pull request Apr 30, 2020
(5.0 - #1) increase the minimum Java version all the way to 8!
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants