aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-core
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2013-07-16 16:49:30 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2013-07-16 16:49:30 +0200
commitf6067d6216b9723df243be28dddb1c0c473f04c7 (patch)
tree6cec9cba7a1e06dabd39e64113fb250f14980aaf /sonar-core
parent5deb4180a9d113e67466ed89759a191640eceb67 (diff)
downloadsonarqube-f6067d6216b9723df243be28dddb1c0c473f04c7.tar.gz
sonarqube-f6067d6216b9723df243be28dddb1c0c473f04c7.zip
Fix quality flaw
Diffstat (limited to 'sonar-core')
-rw-r--r--sonar-core/src/main/java/org/sonar/core/resource/ResourceDao.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/sonar-core/src/main/java/org/sonar/core/resource/ResourceDao.java b/sonar-core/src/main/java/org/sonar/core/resource/ResourceDao.java
index 9c9b4bd71f3..b6a5e8c113f 100644
--- a/sonar-core/src/main/java/org/sonar/core/resource/ResourceDao.java
+++ b/sonar-core/src/main/java/org/sonar/core/resource/ResourceDao.java
@@ -212,8 +212,8 @@ public class ResourceDao {
public static List<ComponentDto> toComponents(List<ResourceDto> resourceDto){
return newArrayList(Iterables.transform(resourceDto, new Function<ResourceDto, ComponentDto>() {
@Override
- public ComponentDto apply(ResourceDto resourceDto) {
- return toComponent(resourceDto);
+ public ComponentDto apply(@Nullable ResourceDto resourceDto) {
+ return resourceDto == null ? null : toComponent(resourceDto);
}
}));
}