aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-deprecated
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2014-02-24 17:53:37 +0100
committerSimon Brandhof <simon.brandhof@gmail.com>2014-02-24 17:57:59 +0100
commitb93e0b5019eb8975f5af8a2662eebc727638ab97 (patch)
tree911499a1dc93747e849ff1defa0dc9aa647bf95d /sonar-deprecated
parentee3bfbc166569edc39274e647beb1cd4d43d2e4a (diff)
downloadsonarqube-b93e0b5019eb8975f5af8a2662eebc727638ab97.tar.gz
sonarqube-b93e0b5019eb8975f5af8a2662eebc727638ab97.zip
Fix some quality flaws
Diffstat (limited to 'sonar-deprecated')
-rw-r--r--sonar-deprecated/src/main/java/org/sonar/api/resources/JavaFile.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/sonar-deprecated/src/main/java/org/sonar/api/resources/JavaFile.java b/sonar-deprecated/src/main/java/org/sonar/api/resources/JavaFile.java
index 4bb59509364..431fef44c10 100644
--- a/sonar-deprecated/src/main/java/org/sonar/api/resources/JavaFile.java
+++ b/sonar-deprecated/src/main/java/org/sonar/api/resources/JavaFile.java
@@ -213,7 +213,7 @@ public class JavaFile extends Resource {
javaFile.setPath(normalizedPath);
javaFile.parent = new JavaPackage();
String directoryPath;
- if (normalizedPath.contains(Directory.SEPARATOR)) {
+ if (normalizedPath != null && normalizedPath.contains(Directory.SEPARATOR)) {
directoryPath = StringUtils.substringBeforeLast(normalizedPath, Directory.SEPARATOR);
} else {
directoryPath = Directory.SEPARATOR;