final List<Long> anchorIds;
if (paginationOption == NO_PAGINATION) {
- anchorIds = Collections.EMPTY_LIST;
+ anchorIds = Collections.emptyList();
} else {
anchorIds = getAnchorIdsForPagination(dataspaceEntity, cpsPathQuery, paginationOption);
if (anchorIds.isEmpty()) {
.filter(entity -> StringUtils.equals(checksum, (entity.getChecksum())))
.findFirst()
.map(YangResourceEntity::getFileName);
- if (optionalFileName.isPresent()) {
- return optionalFileName.get();
- }
- return "no filename";
+ return optionalFileName.orElse("no filename");
}
private String getDuplicatedChecksumFromException(final ConstraintViolationException exception) {
*/
public Query getQueryForAnchorAndCpsPath(final AnchorEntity anchorEntity, final CpsPathQuery cpsPathQuery) {
return getQueryForDataspaceOrAnchorAndCpsPath(anchorEntity.getDataspace(),
- anchorEntity, cpsPathQuery, Collections.EMPTY_LIST);
+ anchorEntity, cpsPathQuery, Collections.emptyList());
}
/**