Skip to content

Commit

Permalink
Adding empty list check for conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
Ark2307 committed Jan 2, 2025
1 parent b79197b commit 14e3e7b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public List<ApiCollection> fillApiCollectionsUrlCount(List<ApiCollection> apiCol
int conditionsCount = 0;
if(!apiCollection.getAutomated()){
ApiCollection apiCollectionWithCond = ApiCollectionsDao.instance.findOne(Filters.eq(Constants.ID, apiCollection.getId()), Projections.include("conditions"));
if(apiCollectionWithCond.getConditions() != null && apiCollectionWithCond.getConditions().get(0) != null){
if(apiCollectionWithCond.getConditions() != null && !apiCollectionWithCond.getConditions().isEmpty() && apiCollectionWithCond.getConditions().get(0) != null){
if(apiCollectionWithCond.getConditions().get(0).getType().equals(TestingEndpoints.Type.CUSTOM)){
CustomTestingEndpoints testingEndpoints = (CustomTestingEndpoints) apiCollectionWithCond.getConditions().get(0);
if (testingEndpoints.getApisList() != null && !testingEndpoints.getApisList().isEmpty()) {
Expand Down

0 comments on commit 14e3e7b

Please sign in to comment.