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

Conversation

@LaunchDarklyReleaseBot
Copy link
Contributor

[2.0.0] - 2022-12-01

This major version release of java-sdk-common corresponds to the upcoming v6.0.0 release of the LaunchDarkly Java SDK (java-server-sdk) and the v4.0.0 release of the LaunchDarkly Android SDK (android-client-sdk), and cannot be used with earlier SDK versions.

Added:

  • The types LDContext and ContextKind define the new "context" model. "Contexts" are a replacement for the earlier concept of "users"; they can be populated with attributes in more or less the same way as before, but they also support new behaviors. More information about these features will be included in the release notes for the v6.0.0 Java SDK and v4.0.0 Android SDK releases.
  • The type AttributeRef defines the attribute reference syntax, for referencing subproperties of JSON objects in flag evaluations or private attribute configuration. Applications normally will not need to reference this type.

Changed:

  • It was previously allowable to set a user key to an empty string. In the new context model, the key is not allowed to be empty. Trying to use an empty key will cause evaluations to fail and return the default value.
  • There is no longer such a thing as a secondary meta-attribute that affects percentage rollouts. If you set an attribute with that name in an LDContext, it will simply be a custom attribute like any other.
  • The anonymous attribute in LDUser is now a simple boolean, with no distinction between a false state and a null state.

Removed:

  • Removed all types, fields, and methods that were deprecated as of the most recent release.
  • Removed the secondary meta-attribute in LDUser and LDUser.Builder.

…sses

add getters to EvaluationReason and hide its subclasses
…lasses

completely remove EvaluationReason subclasses
# Conflicts:
#	src/main/java/com/launchdarkly/sdk/EvaluationReason.java
#	src/main/java/com/launchdarkly/sdk/LDValue.java
remove @SInCE tags, misc doc fixes, add note about changelogging
make EvaluationDetail non-nullable + use boolean singletons
add JSON helpers, better serialization logic, and Gson adapter
# Conflicts:
#	src/main/java/com/launchdarkly/sdk/EvaluationDetail.java
#	src/test/java/com/launchdarkly/sdk/EvaluationReasonTest.java
#	src/test/java/com/launchdarkly/sdk/LDUserTest.java
improve and rigorously test equals() for all immutable types
more predictable exception behavior for LDValue.parse()
…dation

(U2C 4) fix context kind/key validation logic
use percent-encoding for specific characters in fully-qualified key, not URLEncoder
flatten nested multi-kind contexts when building a multi-kind context
…ation

fix user JSON validation to require that "custom" is an object or null
…ay-index

attribute ref components are always properties, not array indices
* re-add LDUser type, add conversion to LDContext

* misc fixes

* re-add test
…-null-key

allow anonymous user with null key to be converted to a context
doc comment improvements for user/context types
@LaunchDarklyReleaseBot LaunchDarklyReleaseBot merged commit a82ac2d into main Dec 1, 2022
@LaunchDarklyReleaseBot LaunchDarklyReleaseBot deleted the release-2.0.0 branch December 1, 2022 21:02
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.

10 participants