Skip to content
Snippets Groups Projects
Commit 52aff702 authored by srosse's avatar srosse
Browse files

OO-2362: hardened the patch

parent 9d7969c9
No related branches found
No related tags found
No related merge requests found
...@@ -104,8 +104,8 @@ public class RepositoryEntryMyCourseQueries { ...@@ -104,8 +104,8 @@ public class RepositoryEntryMyCourseQueries {
// we don't need statistics when rating and comments are disabled unless // we don't need statistics when rating and comments are disabled unless
// were searching for videos, there we want to see the launch counter // were searching for videos, there we want to see the launch counter
// from the statistics // from the statistics
boolean neddStats = repositoryModule.isRatingEnabled() || repositoryModule.isCommentEnabled() || boolean needStats = repositoryModule.isRatingEnabled() || repositoryModule.isCommentEnabled() ||
params.getResourceTypes().contains(VideoFileResource.TYPE_NAME); (params.getResourceTypes() != null && params.getResourceTypes().contains(VideoFileResource.TYPE_NAME));
List<Long> effKeys = new ArrayList<>(); List<Long> effKeys = new ArrayList<>();
List<Object[]> objects = query.getResultList(); List<Object[]> objects = query.getResultList();
...@@ -120,7 +120,7 @@ public class RepositoryEntryMyCourseQueries { ...@@ -120,7 +120,7 @@ public class RepositoryEntryMyCourseQueries {
Integer myRating = (Integer)object[3]; Integer myRating = (Integer)object[3];
RepositoryEntryStatistics stats; RepositoryEntryStatistics stats;
if (neddStats) { if (needStats) {
stats = re.getStatistics(); stats = re.getStatistics();
} else { } else {
stats = null; stats = null;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment