aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api/src
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2014-10-10 11:17:24 +0200
committerJulien HENRY <julien.henry@sonarsource.com>2014-10-14 11:59:06 +0200
commit0d2a019b933e3a90de9c8365bfa4037b9d44d943 (patch)
tree7b2843c149f3a5c83537004e7038a6f78174708d /sonar-plugin-api/src
parent4e3edd5a810a59bf307e548ecbc14fd7de7eb690 (diff)
downloadsonarqube-0d2a019b933e3a90de9c8365bfa4037b9d44d943.tar.gz
sonarqube-0d2a019b933e3a90de9c8365bfa4037b9d44d943.zip
SONAR-5256 Fix NPE and add warning when sonar.importSources=false
Diffstat (limited to 'sonar-plugin-api/src')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/batch/SonarIndex.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/SonarIndex.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/SonarIndex.java
index f52fcb98f0a..cbe29014b2f 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/SonarIndex.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/SonarIndex.java
@@ -100,9 +100,11 @@ public abstract class SonarIndex implements DirectedGraphAccessor<Resource, Depe
public abstract void setSource(Resource reference, String source);
/**
- * @return source code associated with a specified resource, <code>null</code> if not available
+ * @return source code associated with a specified resource, <code>null</code> if not available
+ * (for example when sonar.importSources=false)
* @since 2.9
*/
+ @CheckForNull
public abstract String getSource(Resource resource);
public abstract Project getProject();