Skip to content

Remove parameter value/return nullability in IImageSourceParser, ILocalLinkParser and IMacroParser#15130

Merged
bergmania merged 2 commits intov13/devfrom
v13/task/align-nullability-of-rich-text-parsers
Nov 6, 2023
Merged

Remove parameter value/return nullability in IImageSourceParser, ILocalLinkParser and IMacroParser#15130
bergmania merged 2 commits intov13/devfrom
v13/task/align-nullability-of-rich-text-parsers

Conversation

@AndyButland
Copy link
Contributor

This update just aligns the nullability of the parameter and return value of the three interfaces that define parsers for rich text content. It's not essential, but nice to tidy up.

Implemented in response to this comment.

There is no implementation of this class in the CMS itself.

…rsers (IMacroParser and IImageSourceParser).
Copy link
Contributor

@ronaldbarendse ronaldbarendse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we don't need to parse the value if it's null, we can avoid some methods calls by removing the nullability from the value parameter and return type (all implementations would otherwise do a if (value is null) return null; check anyway).

@ronaldbarendse ronaldbarendse changed the title Align nullability of ILocalLinkParser with other rich text content parsers (IMacroParser and IImageSourceParser). Remove parameter value/return nullability in IImageSourceParser, ILocalLinkParser and IMacroParser Nov 6, 2023
@bergmania bergmania merged commit fee32bd into v13/dev Nov 6, 2023
@bergmania bergmania deleted the v13/task/align-nullability-of-rich-text-parsers branch November 6, 2023 16:58
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.

3 participants