Commit e09311a
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 25a0afe commit e09311a
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 | |
|---|---|---|---|
| |||
945 | 945 | | |
946 | 946 | | |
947 | 947 | | |
948 | | - | |
949 | | - | |
950 | | - | |
951 | | - | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
952 | 951 | | |
953 | 952 | | |
954 | 953 | | |
955 | | - | |
| 954 | + | |
| 955 | + | |
956 | 956 | | |
957 | 957 | | |
958 | 958 | | |
959 | | - | |
| 959 | + | |
960 | 960 | | |
961 | 961 | | |
962 | 962 | | |
| |||
1063 | 1063 | | |
1064 | 1064 | | |
1065 | 1065 | | |
1066 | | - | |
1067 | | - | |
1068 | | - | |
1069 | | - | |
1070 | | - | |
1071 | | - | |
1072 | | - | |
1073 | | - | |
1074 | | - | |
1075 | | - | |
1076 | | - | |
1077 | | - | |
1078 | | - | |
1079 | | - | |
1080 | | - | |
1081 | | - | |
1082 | | - | |
1083 | | - | |
1084 | | - | |
1085 | | - | |
1086 | 1066 | | |
1087 | 1067 | | |
1088 | 1068 | | |
| |||
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