Skip to content

Prevent NPE in calendar when selecting same granularity twice#6523

Merged
solth merged 1 commit intokitodo:mainfrom
effective-webwork:calendar-npe-fix
May 2, 2025
Merged

Prevent NPE in calendar when selecting same granularity twice#6523
solth merged 1 commit intokitodo:mainfrom
effective-webwork:calendar-npe-fix

Conversation

@solth
Copy link
Copy Markdown
Member

@solth solth commented May 1, 2025

Fixes #6437

As @oliver-stoehr suspected, clicking the same <p:selectOneButton> twice actually deselects the corresponding button/option - as can be seen in this PrimeFaces showcase - which results in no option being selected.

Since we do not support selecting no granularity at all in the calendar tool at the moment, simply ignoring the "deselection" events in the correponding bean action should be enough to effectively prevent the reported NPE.

@solth solth merged commit 940348e into kitodo:main May 2, 2025
6 checks passed
@solth solth deleted the calendar-npe-fix branch May 2, 2025 11:38
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.

Deselecting the granularity in calendar produces NPE

2 participants