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:
[email protected]


With regards,
Apache Git Services

Reply via email to