formatOptionalString returns "Not available" for blank/null values.
For location and streamUrl, this means a missing stream URL will render as "Not available" in the email rather than an empty string. Verify this is the intended behavior — if not, use valueOrEmpty directly or a different formatter.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In
`@server/src/main/java/de/tum/cit/aet/thesis/mailVariables/MailThesisPresentation.java`
around lines 31 - 32, The current code passes presentation.getLocation() and
presentation.getStreamUrl() through DataFormatter.formatOptionalString which
returns "Not available" for blank/null; to render empty string instead, replace
valueOrEmpty(DataFormatter.formatOptionalString(presentation.getLocation())) and
valueOrEmpty(DataFormatter.formatOptionalString(presentation.getStreamUrl()))
with valueOrEmpty(presentation.getLocation()) and
valueOrEmpty(presentation.getStreamUrl()) respectively (or if you prefer a
different formatting, call the formatter that preserves empty -> ""), updating
these occurrences in MailThesisPresentation.
Originally posted by @coderabbitai[bot] in #830 (comment)
formatOptionalStringreturns"Not available"for blank/null values.For
locationandstreamUrl, this means a missing stream URL will render as "Not available" in the email rather than an empty string. Verify this is the intended behavior — if not, usevalueOrEmptydirectly or a different formatter.🤖 Prompt for AI Agents
Originally posted by @coderabbitai[bot] in #830 (comment)