josehernandezfintecheandomx commented on code in PR #2783:
URL: https://github.com/apache/fineract/pull/2783#discussion_r1049303799


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/AccountNumberGenerator.java:
##########
@@ -165,7 +153,7 @@ private String generateAccountNumber(Map<String, String> 
propertyMap, AccountNum
                 prefix = prefix.substring(0, Math.min(prefix.length(), 10));
             }
             if 
(accountNumberPrefixType.getValue().equals(AccountNumberPrefixType.PREFIX_SHORT_NAME.getValue()))
 {
-                Integer prefixLength = prefix.length();
+                Integer prefixLength = prefix == null ? 10 : prefix.length();

Review Comment:
   This is a Potential null pointer access, but If that makes you happy, It has 
been reverted



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to