Skip to content

Commit 45a3917

Browse files
authored
fix(platform-client): validate userAgents is not null (#187)
1 parent c3d5fec commit 45a3917

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/main/java/com/coveo/pushapiclient/PlatformClient.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -616,6 +616,9 @@ public String[] getUserAgents() {
616616
}
617617

618618
public void setUserAgents(String[] userAgents) {
619+
if (userAgents == null) {
620+
throw new IllegalArgumentException("User agents cannot be null");
621+
}
619622
if (!validUserAgents(userAgents)) {
620623
throw new IllegalArgumentException("Invalid user agents");
621624
}

0 commit comments

Comments
 (0)