Revision 2:dcd717e1bcae src/my/com/upass/ConfigBean.java
src/my/com/upass/ConfigBean.java | ||
---|---|---|
11 | 11 |
|
12 | 12 |
package my.com.upass; |
13 | 13 |
|
14 |
import org.apache.commons.lang.StringUtils; |
|
15 |
|
|
14 | 16 |
/** |
15 | 17 |
* @author penril |
16 | 18 |
* |
... | ... | |
281 | 283 |
} |
282 | 284 |
public void setPasswordValidPattern(String passwordValidPattern) { |
283 | 285 |
//this will ensure that if the pattern is empty string, it is always set to null to represent no value is set |
284 |
if (passwordValidPattern!=null && passwordValidPattern.isEmpty()) {
|
|
286 |
if (StringUtils.isEmpty(passwordValidPattern)) {
|
|
285 | 287 |
passwordValidPattern = null; |
286 | 288 |
} |
287 | 289 |
this.passwordValidPattern = passwordValidPattern; |
... | ... | |
342 | 344 |
public void setPasswordAcceptPattern(String passwordAcceptPattern) { |
343 | 345 |
|
344 | 346 |
//this will ensure that if the pattern is empty string, it is always set to null to represent no value is set |
345 |
if (passwordAcceptPattern!=null && passwordAcceptPattern.isEmpty()) {
|
|
347 |
if (StringUtils.isEmpty(passwordAcceptPattern)) {
|
|
346 | 348 |
passwordAcceptPattern = null; |
347 | 349 |
} |
348 | 350 |
|
Also available in: Unified diff