9
9
import java .util .Objects ;
10
10
import java .util .Optional ;
11
11
import java .util .stream .Collectors ;
12
- import java .util .stream .Stream ;
13
12
14
13
import org .slf4j .Logger ;
15
14
import org .slf4j .LoggerFactory ;
@@ -74,10 +73,11 @@ public List<ValidationPackageWithDepedencies> downloadPackagesWithDependencies(
74
73
packages .add (ValidationPackageWithDepedencies .from (packagesByNameAndVersion , identifier ));
75
74
}
76
75
77
- logger .info ("Using packages {} for validation" ,
78
- packages .stream ().flatMap (p -> Stream .concat (Stream .of (p ), p .getDependencies ().stream ()))
79
- .map (ValidationPackage ::getIdentifier ).map (ValidationPackageIdentifier ::toString ).sorted ()
80
- .collect (Collectors .joining (", " , "[" , "]" )));
76
+ logger .info ("Validating with packages {}" ,
77
+ packages .stream ().map (p -> p .getIdentifier ().toString () + " {dependencies: "
78
+ + p .getDependencies ().stream ().map (ValidationPackage ::getIdentifier )
79
+ .map (ValidationPackageIdentifier ::toString ).sorted ().collect (Collectors .joining (", " ))
80
+ + "}" ).collect (Collectors .joining (", " , "[" , "]" )));
81
81
82
82
return packages ;
83
83
}
@@ -88,6 +88,9 @@ private void downloadPackageWithDependencies(ValidationPackageIdentifier identif
88
88
{
89
89
if (allPackagesByNameAndVersion .containsKey (identifier ))
90
90
{
91
+ ValidationPackage dependency = allPackagesByNameAndVersion .get (identifier );
92
+ packagesByNameAndVersion .put (identifier , dependency );
93
+
91
94
// already downloaded
92
95
return ;
93
96
}
@@ -103,6 +106,9 @@ else if (noDownloadPackages.contains(identifier))
103
106
// check again, as the identifier may have changed from a A.B.x wildcard
104
107
if (allPackagesByNameAndVersion .containsKey (identifier ))
105
108
{
109
+ ValidationPackage dependency = allPackagesByNameAndVersion .get (identifier );
110
+ packagesByNameAndVersion .put (identifier , dependency );
111
+
106
112
// already downloaded
107
113
return ;
108
114
}
0 commit comments