Hi guys,
Trying to update the 2.2.x branch to use generics java5 syntax in
collections for better type safety I fall into this :
DefaultMavenProjectBuilder.normalizeToArtifactRepositories() method converts
a List that can contain either Repository or ArtifactRepository to a list of
ArtifactRepository. A new ArrayList is created and returned to contain those
normalised objects.
Beeing a private method the only call is from public
Model findModelFromRepository( ... ) BUT this method does not use the
returned result :
normalizeToArtifactRepositories( remoteArtifactRepositories,
projectId ); // Missing "List repositories = ..."
Two options there :
- this dead code,
- there is a valid use case to call findModelFromRepository with a
List<Repository>, if true we have a bug here.
Nicolas