Project

General

Profile

Revision ae7b9470

IDae7b94709668602f810d76ee83b5ce7a213b6872
Parent 8c2c6a09
Child 1d54cd17

Added by Andreas Müller about 3 years ago

ref #6065 fix NPE in pageSize/limit

View differences:

cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/TaxonNodeServiceImpl.java
121 121

  
122 122
        List<TaxonNodeDto> dtos = new ArrayList<>(pageSize==null?25:pageSize);
123 123
        Integer start = PagerUtils.startFor(pageSize, pageIndex);
124
        start = start == null? Integer.MAX_VALUE : start;
125
        int limit = PagerUtils.limitFor(pageSize);
124
        start = start == null ? 0 : start;
125
        Integer limit = PagerUtils.limitFor(pageSize);
126
        limit = limit == null ? Integer.MAX_VALUE : limit;
126 127
        Long totalCount = Long.valueOf(allRecords.size());
127 128

  
128 129
        if(PagerUtils.hasResultsInRange(totalCount, pageIndex, pageSize)) {

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)