Commit ef2a103
refactor: extract shared resolveVerifiedMavenBinary on JavaMavenProvider
Consolidate duplicate Maven binary resolution logic between ExhortApi
and JavaMavenProvider into a single public static method that verifies
the binary with --version before returning it.
- Add JavaMavenProvider.resolveVerifiedMavenBinary(Path) returning
Optional<String> with wrapper-first resolution and verification
- Refactor selectMvnRuntime to delegate to the new shared method
- Delete duplicate resolveMavenBinary from ExhortApi, update
discoverMavenModules to call the shared method via .orElse(null)
- Fix @return JavaDoc on discoverMavenModules to match actual behavior
- Make 2-arg traverseForMvnw static (required by static caller)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 580d9b3 commit ef2a103
2 files changed
Lines changed: 36 additions & 46 deletions
File tree
- src/main/java/io/github/guacsec/trustifyda
- impl
- providers
Lines changed: 6 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
990 | 990 | | |
991 | 991 | | |
992 | 992 | | |
993 | | - | |
994 | | - | |
995 | | - | |
996 | | - | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
997 | 996 | | |
998 | 997 | | |
999 | 998 | | |
1000 | | - | |
| 999 | + | |
| 1000 | + | |
1001 | 1001 | | |
1002 | 1002 | | |
1003 | 1003 | | |
1004 | | - | |
| 1004 | + | |
1005 | 1005 | | |
1006 | 1006 | | |
1007 | 1007 | | |
| |||
1108 | 1108 | | |
1109 | 1109 | | |
1110 | 1110 | | |
1111 | | - | |
1112 | | - | |
1113 | | - | |
1114 | | - | |
1115 | | - | |
1116 | | - | |
1117 | | - | |
1118 | | - | |
1119 | | - | |
1120 | | - | |
1121 | | - | |
1122 | | - | |
1123 | | - | |
1124 | | - | |
1125 | | - | |
1126 | | - | |
1127 | | - | |
1128 | | - | |
1129 | | - | |
1130 | | - | |
1131 | 1111 | | |
1132 | 1112 | | |
1133 | 1113 | | |
| |||
Lines changed: 30 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
431 | 431 | | |
432 | 432 | | |
433 | 433 | | |
434 | | - | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | | - | |
445 | | - | |
446 | | - | |
447 | | - | |
448 | | - | |
449 | | - | |
450 | | - | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
451 | 440 | | |
| 441 | + | |
452 | 442 | | |
453 | 443 | | |
454 | | - | |
455 | 444 | | |
456 | 445 | | |
457 | 446 | | |
458 | 447 | | |
459 | 448 | | |
460 | 449 | | |
461 | 450 | | |
462 | | - | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
463 | 473 | | |
464 | 474 | | |
465 | 475 | | |
| |||
0 commit comments