GenericName[] names = new GenericName[aliases.length];
for (int i=0; i<aliases.length; i++) {
final CharSequence alias = (CharSequence) aliases[i];
if (alias != null) {
if (count < authorities.length) {
final LocalName authority = authorities[count];
if (authority != null) {
names[count++] = new org.geotools.util.ScopedName(authority, alias);
continue;
}
}
names[count++] = new LocalName(alias);
}
}
names = XArray.resize(names, count);
for (int i=0; i<names.length; i++) {
final String alias = names[i].tip().toString();