private static BigDecimal normalizeDecimalValue(BigDecimal bigDecimal,int allowedPrecision){
  if (bigDecimal.precision() > allowedPrecision) {
    return null;
  }
  return bigDecimal;
}

private static BigDecimal normalizeDecimalValue ( BigDecimal bigDecimal , int allowedPrecision ) { if ( bigDecimal . precision ( ) > allowedPrecision ) { return null ; } return bigDecimal ; }
this method will check the digits before dot with the max precision allowed
