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

Commit f4f4cb5

Browse files
committed
Merge
2 parents cb7957a + d92cd8d commit f4f4cb5

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repositories {
1111

1212
allprojects {
1313
group = 'com.launchdarkly'
14-
version = "0.15.0"
14+
version = "0.16.0-SNAPSHOT"
1515
sourceCompatibility = 1.6
1616
targetCompatibility = 1.6
1717
}

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

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,8 +291,19 @@ public Builder custom(String k, Boolean b) {
291291
* @param k the key for the list
292292
* @param vs the values for the attribute
293293
* @return the builder
294+
* @deprecated As of version 0.16.0, renamed to {@link #customString(String, List<String>)}
294295
*/
295296
public Builder custom(String k, List<String> vs) {
297+
return this.customString(k, vs);
298+
}
299+
300+
/**
301+
* Add a list of {@link java.lang.String}-valued custom attributes
302+
* @param k the key for the list
303+
* @param vs the values for the attribute
304+
* @return the builder
305+
*/
306+
public Builder customString(String k, List<String> vs) {
296307
JsonArray array = new JsonArray();
297308
for (String v : vs) {
298309
if (v != null) {
@@ -302,6 +313,23 @@ public Builder custom(String k, List<String> vs) {
302313
custom.put(k, array);
303314
return this;
304315
}
316+
317+
/**
318+
* Add a list of {@link java.lang.Integer}-valued custom attributes
319+
* @param k the key for the list
320+
* @param vs the values for the attribute
321+
* @return the builder
322+
*/
323+
public Builder customInt(String k, List<Integer> vs) {
324+
JsonArray array = new JsonArray();
325+
for (Integer v : vs) {
326+
if (v != null) {
327+
array.add(new JsonPrimitive(v));
328+
}
329+
}
330+
custom.put(k, array);
331+
return this;
332+
}
305333

306334
/**
307335
* Build the configured {@link com.launchdarkly.client.LDUser} object

0 commit comments

Comments
 (0)