jcabi / jcabi-aether

Wrapper of Sonatype Aether

Home Page:http://aether.jcabi.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Aether.java Useless collection

amihaiemil opened this issue Β· comments

In constructor public Aether(final Collection<RemoteRepository> repos, final File repo):

Why is the intermediary rlist Collection needed? Currently rlist is populated and then transformed into an array to be stored in this.remotes. Can't we simply declare this.remotes = new Repository[repos.size()]; at the beginning and then add items in the for loop, like this this.remotes[idx++] = new Repository(remote) ?

@yegor256 take a look at this issue please and dispatch it somehow, see par.21

@amihaiemil this is very cosmetic. also, making the changes you're suggesting won't really make less lines in this ctor. also, will make this.remotes very mutable, which is technically OK, but not how we want to think about it