Skip to content

Commit

Permalink
Address a possible NPE in string comparison for twitter publicize action
Browse files Browse the repository at this point in the history
  • Loading branch information
oguzkocer committed Apr 16, 2019
1 parent a227772 commit dc81204
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public void onErrorResponse(VolleyError volleyError) {
Map<String, String> params = new HashMap<>();
params.put("keyring_connection_ID", Long.toString(keyringConnectionId));
// Sending the external id for Twitter connections result in an error
if (!externalUserId.isEmpty() && !serviceId.equals(PublicizeConstants.TWITTER_ID)) {
if (!TextUtils.isEmpty(externalUserId) && !PublicizeConstants.TWITTER_ID.equals(serviceId)) {
params.put("external_user_ID", externalUserId);
}
String path = String.format(Locale.ROOT, "/sites/%d/publicize-connections/new", siteId);
Expand Down

0 comments on commit dc81204

Please sign in to comment.