Skip to content

findMatchingTableRow is not null safe#123

Merged
ctmay4 merged 1 commit intomasterfrom
find-matching-table-row-npe
Sep 30, 2025
Merged

findMatchingTableRow is not null safe#123
ctmay4 merged 1 commit intomasterfrom
find-matching-table-row-npe

Conversation

@ctmay4
Copy link
Member

@ctmay4 ctmay4 commented Sep 30, 2025

We ran into this:

Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: org.cache2k.io.CacheLoaderException: java.lang.NullPointerException: Cannot invoke "java.util.List.size()" because the return value of "com.imsweb.staging.entities.Table.getTableRows()" is null] with root cause
java.lang.NullPointerException: Cannot invoke "java.util.List.size()" because the return value of "com.imsweb.staging.entities.Table.getTableRows()" is null
	at com.imsweb.staging.engine.DecisionEngine.findMatchingTableRow(DecisionEngine.java:133)
	at com.imsweb.staging.engine.DecisionEngine.matchTable(DecisionEngine.java:103)
	at com.imsweb.staging.StagingDataProvider.getSchemas(StagingDataProvider.java:505)

findMatchingTableRow was missing a null check.

@ctmay4 ctmay4 self-assigned this Sep 30, 2025
@ctmay4 ctmay4 added the bug label Sep 30, 2025
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
66.7% Coverage on New Code (required ≥ 70%)

See analysis details on SonarQube Cloud

@ctmay4 ctmay4 merged commit b18b033 into master Sep 30, 2025
3 of 4 checks passed
@ctmay4 ctmay4 deleted the find-matching-table-row-npe branch September 30, 2025 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments