Skip to content

GH Issue 1631: ViewContext.getString() - #8118

Open
labkey-adam wants to merge 6 commits into
developfrom
fb_viewcontext_get_string
Open

labkey-adam wants to merge 6 commits into
developfrom
fb_viewcontext_get_string

Conversation

@labkey-adam

@labkey-adam labkey-adam commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Rationale

Stop repeated URL parameters from causing unhandled ClassCastExceptions (GH Issue 1631).

Changes

  • Introduce ViewContext.getString() which checks the value type before returning it. It returns null or a String, or else it throws a clear BadRequestException, which avoids logging and mothership reporting.
  • Use this safer method in StudyController, ReportsController, AnnouncementsController, etc.
  • Simple unit test for getString()
  • Introduce ViewContext.get(String) and deprecate ViewContext.get(Object)

@labkey-adam labkey-adam changed the title ViewContext.getString() GH Issue 1631: ViewContext.getString() Sep 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant