Fuuny to see you created this method :) 616830 jdcasey private List normalizeToArtifactRepositories( List remoteArtifactRepositories,
------------------------------------------------------------------------ r616830 | jdcasey | 2008-01-30 19:24:41 +0100 (mer., 30 janv. 2008) | 1 line porting revId 616610 of trunk back to 2.0.x branch, to allow passing in of Repos itory (model instance) lists into buildFromRepository(..) without causing the bu ild to fail (we're normalizing them to ArtifactRepository instances now). This w as a problem with the remote-resources plugin in the xwiki build. ------------------------------------------------------------------------ Seems the remote-resources plugin bug in xwiki build will occur with 2.2. The side effect is that we can't use strong type collection for buildFromRepository( .. ) methods as Repository and ArtifactRepository don't even share a common parent class. 2009/5/4 John Casey <jdca...@commonjava.org> > 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: dev-unsubscr...@maven.apache.org > For additional commands, e-mail: dev-h...@maven.apache.org > >