import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collections;
import java.util.Enumeration;
import java.util.List;
import java.util.Vector;
}
if (dbrefs==null || dbrefs.length==0)
{
- return Arrays.asList(new DBRefEntry[0]);
+ return Collections.emptyList();
}
synchronized (dbrefs)
{
List<DBRefEntry> primaries = new ArrayList<DBRefEntry>();
- DBRefEntry tmp[] = new DBRefEntry[1], res[] = null;
+ DBRefEntry[] tmp = new DBRefEntry[1];
for (DBRefEntry ref : dbrefs)
{
if (!ref.isPrimary())
}
// check standard protein or dna sources
tmp[0] = ref;
- res = DBRefUtils.selectDbRefs(!isProtein(), tmp);
+ DBRefEntry[] res = DBRefUtils.selectDbRefs(!isProtein(), tmp);
if (res != null && res[0] == tmp[0])
{
primaries.add(ref);