[DS-1530] Insist on a nonblank email address

This commit is contained in:
Mark H. Wood
2013-11-27 11:46:06 -05:00
parent d4f87ffeb6
commit 420435b536

View File

@@ -45,7 +45,7 @@ import org.dspace.eperson.Group;
public final class CreateAdministrator public final class CreateAdministrator
{ {
/** DSpace Context object */ /** DSpace Context object */
private Context context; private final Context context;
/** /**
* For invoking via the command line. If called with no command line arguments, * For invoking via the command line. If called with no command line arguments,
@@ -123,10 +123,15 @@ public final class CreateAdministrator
System.out.flush(); System.out.flush();
email = input.readLine(); email = input.readLine();
if (email != null) if (!StringUtils.isBlank(email))
{ {
email = email.trim(); email = email.trim();
} }
else
{
System.out.println("Please provide an email address.");
continue;
}
System.out.print("First name: "); System.out.print("First name: ");
System.out.flush(); System.out.flush();