List of usage examples for org.apache.commons.lang ArrayUtils isNotEmpty
public static boolean isNotEmpty(boolean[] array)
Checks if an array of primitive booleans is not empty or not null
.
From source file:uk.ac.ucl.cs.cmic.giftcloud.restserver.PasswordAuthenticationWrapper.java
static Optional<PasswordAuthentication> getPasswordAuthenticationFromUsernamePassword( final Optional<String> userName, final Optional<char[]> password) { if (userName.isPresent() && password.isPresent() && StringUtils.isNotBlank(userName.get()) && ArrayUtils.isNotEmpty(password.get())) { return Optional.of(new PasswordAuthentication(userName.get(), password.get())); } else {//from w w w . j av a 2 s.c o m return Optional.empty(); } }