Skip to content

Commit

Permalink
RAP-96 Fixed Null pointer exception
Browse files Browse the repository at this point in the history
  • Loading branch information
QuyenLy87 committed Sep 23, 2024
1 parent ec5f318 commit 9f2255b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -784,6 +784,7 @@ private List<Build> filterByViewMode(List<Build> allBuilds, List<String> tagPath
case UNPUBLISHED ->
allBuilds = allBuilds.stream().filter(build -> getTags(build, tagPaths) == null || !getTags(build, tagPaths).contains(Tag.PUBLISHED)).collect(Collectors.toList());
case ALL_RELEASES -> {
// do nothing
}
case DEFAULT -> {
List<Build> copy = new ArrayList<>(allBuilds);
Expand Down Expand Up @@ -1390,7 +1391,7 @@ private GetS3ObjectResponse getS3Objects(String buildBucketName, String releaseC
}
s3Objects = new ArrayList<>();
buildIds.stream().parallel().forEach(buildId ->
s3Objects.addAll(doGetS3ObjectsByBuildId(buildBucketName, prefix, buildId))
s3Objects.addAll(doGetS3ObjectsByBuildId(buildBucketName, prefix, buildId))
);
} else {
if (isGetBuildsForProduct && !CollectionUtils.isEmpty(forYears)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public List<String> getPublishedPackages(final ReleaseCenter releaseCenter) {
@Override
public List<Build> findPublishedBuilds(String releaseCenterKey, String productKey) throws ResourceNotFoundException {
List<Build> builds = buildDao.findAllDesc(releaseCenterKey, productKey, null, null, true, null);
return builds.stream().filter(item -> item.getTags().contains(Build.Tag.PUBLISHED)).toList();
return builds.stream().filter(item -> item.getTags() != null && item.getTags().contains(Build.Tag.PUBLISHED)).toList();
}

@Override
Expand Down

0 comments on commit 9f2255b

Please sign in to comment.