You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by GitBox <gi...@apache.org> on 2019/11/29 12:04:48 UTC

[GitHub] [fineract] mohitsinha commented on a change in pull request #660: FINERACT-803: validate username uniqueness

mohitsinha commented on a change in pull request #660: FINERACT-803: validate username uniqueness
URL: https://github.com/apache/fineract/pull/660#discussion_r352104389
 
 

 ##########
 File path: fineract-provider/src/main/java/org/apache/fineract/useradministration/service/UserDataValidator.java
 ##########
 @@ -75,6 +80,14 @@ public void validateForCreate(final String json) {
         final String username = this.fromApiJsonHelper.extractStringNamed("username", element);
         baseDataValidator.reset().parameter("username").value(username).notBlank().notExceedingLengthOf(100);
 
+        if (username != null) {
 
 Review comment:
   I believe there is no point going inside this code block, if the username is blank/empty.
   ```suggestion
           if (StringUtils.isEmpty(username)) {
   ```
   ```suggestion
           if (StringUtils.isBlank(username)) {
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services