Optimizations:
- Line 629-631: Eliminated unnecessary ArrayList creation and addAll
call - changed from 3 lines to 1 line returning new
ArrayList<>(Arrays.asList(collection))
- Line 598: Modernized array creation using method reference
NameVersionDescriptor[]::new
- Line 610: Modernized array creation using method reference
TargetBundle[]::new
- Line 527: Modernized array creation using method reference
TargetBundle[]::new
- Line 996: Modernized array creation using method reference
TargetFeature[]::new
Impact:
- Cleaner, more concise code
- Slightly better performance by avoiding unnecessary intermediate
objects
- Modern Java idioms make code easier to maintain
- No API changes