Commit 028463b
TargetDefinition.java - Code Quality Improvements
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 changes1 parent e442ecb commit 028463b
File tree
1 file changed
+5
-7
lines changed- ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target
1 file changed
+5
-7
lines changedLines changed: 5 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
524 | 524 | | |
525 | 525 | | |
526 | 526 | | |
527 | | - | |
| 527 | + | |
528 | 528 | | |
529 | 529 | | |
530 | 530 | | |
| |||
595 | 595 | | |
596 | 596 | | |
597 | 597 | | |
598 | | - | |
| 598 | + | |
599 | 599 | | |
600 | 600 | | |
601 | 601 | | |
| |||
607 | 607 | | |
608 | 608 | | |
609 | 609 | | |
610 | | - | |
| 610 | + | |
611 | 611 | | |
612 | 612 | | |
613 | 613 | | |
| |||
627 | 627 | | |
628 | 628 | | |
629 | 629 | | |
630 | | - | |
631 | | - | |
632 | | - | |
| 630 | + | |
633 | 631 | | |
634 | 632 | | |
635 | 633 | | |
| |||
995 | 993 | | |
996 | 994 | | |
997 | 995 | | |
998 | | - | |
| 996 | + | |
999 | 997 | | |
1000 | 998 | | |
1001 | 999 | | |
| |||
0 commit comments