Skip to content

Commit fc619ca

Browse files
fix(client): accidental mutability of some classes
1 parent eca1570 commit fc619ca

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleCondition.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import com.lithic.api.core.JsonMissing
2222
import com.lithic.api.core.JsonValue
2323
import com.lithic.api.core.allMaxBy
2424
import com.lithic.api.core.getOrThrow
25+
import com.lithic.api.core.toImmutable
2526
import com.lithic.api.errors.LithicInvalidDataException
2627
import java.util.Collections
2728
import java.util.Objects
@@ -589,7 +590,8 @@ private constructor(
589590

590591
/** An array of strings, to be used with `IS_ONE_OF` or `IS_NOT_ONE_OF` */
591592
@JvmStatic
592-
fun ofListOfStrings(listOfStrings: List<String>) = Value(listOfStrings = listOfStrings)
593+
fun ofListOfStrings(listOfStrings: List<String>) =
594+
Value(listOfStrings = listOfStrings.toImmutable())
593595
}
594596

595597
/** An interface that defines how to map each variant of [Value] to a value of type [T]. */

lithic-java-core/src/main/kotlin/com/lithic/api/models/Conditional3dsActionParameters.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1063,7 +1063,7 @@ private constructor(
10631063
/** An array of strings, to be used with `IS_ONE_OF` or `IS_NOT_ONE_OF` */
10641064
@JvmStatic
10651065
fun ofListOfStrings(listOfStrings: List<String>) =
1066-
Value(listOfStrings = listOfStrings)
1066+
Value(listOfStrings = listOfStrings.toImmutable())
10671067
}
10681068

10691069
/**

0 commit comments

Comments
 (0)