I put that in in response to a NPE bug that was filed, IIRC. I don't
think it's dead code, but only expressed in very particular situations.
It's possible that the plugin/whatever that was expressing it has a new
version out that no longer causes this problem, too.
Maybe try a `svn annotate` to find out from which commit that method
comes, and it may give a MNG number.
nicolas de loof wrote:
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
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]