epugh opened a new pull request, #4203:
URL: https://github.com/apache/solr/pull/4203
## Summary
Fixes an unchecked cast compiler warning in
`DefaultSampleDocumentsLoader#parseStringToJson`.
### Changes
- Replaces the raw `instanceof Map` check with a pattern-matching
`instanceof Map<?, ?> rawMap` (Java 21+), eliminating the raw-type warning.
- Scopes `@SuppressWarnings("unchecked")` to just the single local variable
assignment rather than the whole method, making the suppression as narrow as
possible.
- Adds an inline comment explaining why the cast is safe (JSON object keys
are always `String`s).
The runtime behaviour is unchanged.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]