Rev 37297 |
Last modification |
Compare with Previous |
View Log
| RSS feed
Last modification
- Rev 37298 2026-08-12 22:10:01
- Author: amit
- Log message:
- Default subCategoryId to 0 on endpoints that declare it required=false
subCategoryId is a primitive int, so a required=false declaration with no
defaultValue makes Spring throw when the param is omitted:
Optional int parameter 'subCategoryId' is present but cannot be translated
into a null value due to being declared as a primitive type.
v1 DealsController and GuestController already default it to 0; their v2
wrappers dropped that, and StoreController never had it on either version. Any
caller omitting the param got a 500 with a message that does not name the
parameter at fault.
Adding the default only removes that failure path — every currently working
caller already sends a value, so no existing behaviour changes.