File tree Expand file tree Collapse file tree
src/main/java/com/iemr/common/identity/service Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3535
3636import javax .sql .DataSource ;
3737
38+ import org .apache .commons .lang3 .StringUtils ;
3839import org .slf4j .Logger ;
3940import org .slf4j .LoggerFactory ;
4041import org .springframework .beans .factory .annotation .Autowired ;
@@ -1607,13 +1608,15 @@ public List<BeneficiariesDTO> getBeneficiariesDeatilsByBenRegIdList(List<BigInte
16071608 private BeneficiariesDTO getBeneficiariesDTO (MBeneficiarymapping benMap ) {
16081609 BeneficiariesDTO bdto = mapper .mBeneficiarymappingToBeneficiariesDTO (benMap );
16091610 if (null != benMap && null != benMap .getMBeneficiarydetail ()
1610- && null != benMap .getMBeneficiarydetail ().getFaceEmbedding ()) {
1611+ && ! StringUtils . isEmpty ( benMap .getMBeneficiarydetail ().getFaceEmbedding () )) {
16111612 String faceEmbedding = benMap .getMBeneficiarydetail ().getFaceEmbedding ();
16121613 String trimmedInput = faceEmbedding .replaceAll ("[\\ [\\ ]]" , "" );
1613- String [] stringNumbers = trimmedInput .split (",\\ s*" );
16141614 List <Float > floatList = new ArrayList <>();
1615- for (String str : stringNumbers ) {
1616- floatList .add (Float .parseFloat (str ));
1615+ if (!StringUtils .isEmpty (trimmedInput )) {
1616+ String [] stringNumbers = trimmedInput .split (",\\ s*" );
1617+ for (String str : stringNumbers ) {
1618+ floatList .add (Float .parseFloat (str ));
1619+ }
16171620 }
16181621 bdto .setFaceEmbedding (floatList );
16191622 }
You can’t perform that action at this time.
0 commit comments