Skip to content

Commit 087f309

Browse files
authored
fix: support setting null account sid (#688)
1 parent 2c29bbe commit 087f309

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/main/java/com/twilio/Twilio.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,14 +116,9 @@ public static synchronized void setPassword(final String password) {
116116
* Set the account sid.
117117
*
118118
* @param accountSid account sid to use
119-
* @throws AuthenticationException if account sid is null
120119
*/
121120
public static synchronized void setAccountSid(final String accountSid) {
122-
if (accountSid == null) {
123-
throw new AuthenticationException("AccountSid can not be null");
124-
}
125-
126-
if (!accountSid.equals(Twilio.accountSid)) {
121+
if (!Objects.equals(accountSid, Twilio.accountSid)) {
127122
Twilio.invalidate();
128123
}
129124

0 commit comments

Comments
 (0)