oleksii-novikov-onix commented on code in PR #5740:
URL: https://github.com/apache/fineract/pull/5740#discussion_r3079004505


##########
fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/DataValidatorBuilder.java:
##########
@@ -383,6 +383,31 @@ public DataValidatorBuilder positiveAmount() {
         return this;
     }
 
+    public DataValidatorBuilder percentage() {
+        if (this.value == null && this.ignoreNullValue) {
+            return this;
+        }
+
+        if (this.value != null) {
+            final BigDecimal number = 
BigDecimal.valueOf(Double.parseDouble(this.value.toString()));

Review Comment:
   This can be simplified to `new BigDecimal(this.value.toString())`



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