Commit 5111ffc
committed
fix: Lucee/Adobe UDFCasterException on getRouteCachingMetadata() null return
private struct function getRouteCachingMetadata() returned a bare `return;`
(null) for the common "route doesn't opt into caching" case. Lucee enforces
the declared struct return type strictly and throws
UDFCasterException: Cannot cast null value to value of type [struct]
on every request, which is why CI failed with 62 TestBox failures on
lucee@5/lucee@6 - any spec touching HandlerService (event execution,
handler bean lookups, etc) exercises getEventMetadataEntry(), which now
always calls this function.
Drop the explicit struct return type, matching the same
"function that may return null" convention RequestService.cfc's
getContextFromScope() already uses elsewhere in this codebase. Runtime
behavior is unchanged - callers already null-check with isNull().1 parent 147971c commit 5111ffc
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
825 | 825 | | |
826 | 826 | | |
827 | 827 | | |
828 | | - | |
| 828 | + | |
829 | 829 | | |
830 | 830 | | |
831 | 831 | | |
| |||
0 commit comments