public CurrentWorkspaces_Type getCurrentWorkspaces_Type(VM[] vms)
throws CannotTranslateException {
if (vms == null || vms.length == 0) {
return new CurrentWorkspaces_Type(); // *** EARLY RETURN ***
}
final OneCurrentWorkspace_Type[] currents =
new OneCurrentWorkspace_Type[vms.length];
for (int i = 0; i < vms.length; i++) {
currents[i] = this.getOneCurrentWorkspace(vms[i]);
}
return new CurrentWorkspaces_Type(currents);
}