Stirling-PDF/app
PandaMan ffd1abbdb3
Fix ClassCastException in extractBookmarks endpoint (#5578) (#5604)
## Description

Fixes #5578

This PR fixes a `ClassCastException` that occurs when calling
`/api/v1/general/extract-bookmarks`. The method was returning
`List<Map<String, Object>>` directly, but Spring MVC was wrapping it in
a `ResponseEntity`, causing a type mismatch.

## Changes

- Changed return type from `List<Map<String, Object>>` to
`ResponseEntity<List<Map<String, Object>>>`
- Wrapped return values with `ResponseEntity.ok(...)` to match Spring
MVC pattern
- Removed `@ResponseBody` annotation as it is not needed with
`ResponseEntity`

## Verification

This fix follows the same pattern used in other similar endpoints:
- `VerifyPDFController.verifyPDF()` returns
`ResponseEntity<List<PDFVerificationResult>>`
- `ValidateSignatureController.validateSignature()` returns
`ResponseEntity<List<SignatureValidationResult>>`

## Testing

The endpoint should now return a proper JSON response with the list of
bookmarks instead of throwing a 500 error.

---------

Co-authored-by: GitTensor Miner <miner@gittensor.io>
Co-authored-by: Anthony Stirling <77850077+Frooodle@users.noreply.github.com>
2026-02-03 09:48:09 +00:00
..
common Support multiple pipeline watch directories and configurable pipeline base path (#5545) 2026-01-31 20:59:25 +00:00
core Fix ClassCastException in extractBookmarks endpoint (#5578) (#5604) 2026-02-03 09:48:09 +00:00
proprietary Support multiple pipeline watch directories and configurable pipeline base path (#5545) 2026-01-31 20:59:25 +00:00
allowed-licenses.json