Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.launchdarkly.sdk;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

Expand All @@ -8,7 +9,7 @@
* <p>
* Builder methods are not thread-safe.
*/
public final class ArrayBuilder {
public final class ArrayBuilder implements Serializable {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems a little weird to me to make a builder serializable. Do you know which structure is leading the default serialization here? I don't see the dependency from LDContext to here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it the ArrayBuilder in LDValue?

private List<LDValue> builder = new ArrayList<>();
private volatile boolean copyOnWrite = false;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package com.launchdarkly.sdk;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

final class AttributeMap {
final class AttributeMap implements Serializable {
private final AttributeMap parent;
private final Map<String, LDValue> map;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package com.launchdarkly.sdk.json;

import java.io.Serializable;

/**
* Marker interface for SDK classes that have a custom JSON serialization.
*
* @see JsonSerialization
* @see LDGson
*/
public interface JsonSerializable {
public interface JsonSerializable extends Serializable {
}
Loading