Skip to content

fix: return empty string if no summary text defined - #3172

Merged
DiegoCardoso merged 2 commits into
masterfrom
fix/npe-get-summary-text
May 13, 2022
Merged

DiegoCardoso merged 2 commits into
masterfrom
fix/npe-get-summary-text

Conversation

@DiegoCardoso

Copy link
Copy Markdown
Contributor

Description

Returns empty string instead of NPE when calling getSummaryText before any summary text is defined.

Decided to use empty string instead of null to make it consistent with setSummaryText which sets the content to "" when called with null.

Fixes #3171

Type of change

  • Bugfix
  • Feature

Returns empty string instead of NPE when calling `getSummaryText`
before any summary text is defined.

Decided to use empty string instead of `null` to make it consistent
with `setSummaryText` which sets the content to `""` when called with
`null`.

Fixes #3171
@sonarqubecloud

Copy link
Copy Markdown

SonarCloud Quality Gate failed.    Quality Gate failed

Bug D 3 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2831 Code Smells

No Coverage information No Coverage information
2.2% 2.2% Duplication

web-padawan pushed a commit that referenced this pull request May 13, 2022
Co-authored-by: Diego Cardoso <diego@vaadin.com>
web-padawan pushed a commit that referenced this pull request May 13, 2022
Co-authored-by: Diego Cardoso <diego@vaadin.com>
web-padawan pushed a commit that referenced this pull request May 13, 2022
Co-authored-by: Diego Cardoso <diego@vaadin.com>
sissbruecker pushed a commit that referenced this pull request May 16, 2022
Co-authored-by: Diego Cardoso <diego@vaadin.com>
Co-authored-by: Serhii Kulykov <iamkulykov@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Details getSummaryText throws NullPointerExceptions if summary was not set.

3 participants