HubSpot / slack-client

An asynchronous HTTP client for Slack's web API
Apache License 2.0
115 stars 53 forks source link

Fix NPE possibility in SectionIF #214

Open natalieqle-zz opened 3 years ago

natalieqle-zz commented 3 years ago

Updates

In SectionIF.java, text can be null as long as there are fields present. For this case, getText().getText() would throw an NPE, and this is currently happening at the validation step.

To address the above, I added a condition to only perform the second Precondition check if text is not null.