]> source.dussan.org Git - sonarqube.git/commitdiff
Fix quality flaw
authorSimon Brandhof <simon.brandhof@gmail.com>
Tue, 16 Jul 2013 14:49:30 +0000 (16:49 +0200)
committerSimon Brandhof <simon.brandhof@gmail.com>
Tue, 16 Jul 2013 14:49:30 +0000 (16:49 +0200)
sonar-core/src/main/java/org/sonar/core/resource/ResourceDao.java

index 9c9b4bd71f3d36613a0ab367591a36671b26108d..b6a5e8c113f7ceaa7fc0745c4190d48db1af2edb 100644 (file)
@@ -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);
       }
     }));
   }