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

Commit d4db0e5

Browse files
committed
introduce type-specific variants of custom (and deprecate original custom())
1 parent 3f38b59 commit d4db0e5

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

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

Lines changed: 12 additions & 1 deletion
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) {
@@ -309,7 +320,7 @@ public Builder custom(String k, List<String> vs) {
309320
* @param vs the values for the attribute
310321
* @return the builder
311322
*/
312-
public Builder custom(String k, List<Integer> vs) {
323+
public Builder customInt(String k, List<Integer> vs) {
313324
JsonArray array = new JsonArray();
314325
for (Integer v : vs) {
315326
if (v != null) {

0 commit comments

Comments
 (0)