DaanHoogland opened a new pull request, #14560:
URL: https://github.com/apache/cloudstack/pull/14560

   Depends on https://github.com/apache/cloudstack/pull/14559
   
   ### Description
   
   Stack for #12316 (StorageManager tech debt), one PR per item of the issue 
checklist, review only the top commit of each:
   1. #13598: unused methods, fields and return values
   2. never-thrown checked exceptions
   3. raw types and unchecked casts
   4. never-used parameters
   5. remaining trivial warnings
   
   **This PR (3/5)** removes all `rawtypes` and `unchecked` javac warnings in 
the touched storage files (13 + 11 on main, 0 after):
   - `details` MAP parameters in `AddSecondaryStorageCmd`, `AddImageStoreCmd`, 
`CreateStoragePoolCmd` and `UpdateStoragePoolCmd` are typed `Map<String, ? 
extends Map<String, String>>`, as `CreateSecondaryStagingStoreCmd` already 
does. That removes the casts in their accessors and in 
`StorageManagerImpl.extractApiParamAsMap`.
   - `AddImageStoreCmd.setDetails` declared `Map<String, String>` but is given 
the unpacked (nested) map, so its type is corrected. The unused 
`UpdateStoragePoolCmd.setDetails` is removed.
   - `CollectionUtils`/`MapUtils` switch to commons-collections4, whose typed 
`intersection` makes the `(List<String>)` casts unnecessary.
   - The one unavoidable cast (local storage config parsed into untyped maps) 
is now an explicit, commented `@SuppressWarnings`.
   
   Part of #12316
   
   ### Types of changes
   
   - [x] Cleanup (Code refactoring and cleanup, that may add test cases)
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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]

Reply via email to