diff options
author | simonbrandhof <simon.brandhof@gmail.com> | 2010-09-24 09:49:34 +0000 |
---|---|---|
committer | simonbrandhof <simon.brandhof@gmail.com> | 2010-09-24 09:49:34 +0000 |
commit | 60ae8203486a7eed8a4e3b209820c19851b8c309 (patch) | |
tree | 447c7b5f3fc941a69a69610e37960191505acfc0 /sonar-batch | |
parent | fe2910fa2ce3a47ba4c2a254f1d3c2f479dae177 (diff) | |
download | sonarqube-60ae8203486a7eed8a4e3b209820c19851b8c309.tar.gz sonarqube-60ae8203486a7eed8a4e3b209820c19851b8c309.zip |
do not keep in cache violations in DecoratorContext
Diffstat (limited to 'sonar-batch')
-rw-r--r-- | sonar-batch/src/main/java/org/sonar/batch/DefaultDecoratorContext.java | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/DefaultDecoratorContext.java b/sonar-batch/src/main/java/org/sonar/batch/DefaultDecoratorContext.java index 05314d3040e..f812bd0e8fe 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/DefaultDecoratorContext.java +++ b/sonar-batch/src/main/java/org/sonar/batch/DefaultDecoratorContext.java @@ -43,7 +43,6 @@ public class DefaultDecoratorContext implements DecoratorContext { private boolean readOnly = false; private List<DecoratorContext> childrenContexts; - private List<Violation> violations; private ViolationsDao violationsDao; public DefaultDecoratorContext(Resource resource, @@ -60,7 +59,6 @@ public class DefaultDecoratorContext implements DecoratorContext { public DefaultDecoratorContext setReadOnly(boolean b) { readOnly = b; - violations = null; childrenContexts = null; return this; } @@ -125,13 +123,12 @@ public class DefaultDecoratorContext implements DecoratorContext { public List<Violation> getViolations() { - if (violations == null) { Bucket bucket = index.getBucket(resource); if (bucket != null && bucket.getSnapshotId() != null) { - violations = violationsDao.getViolations(resource, bucket.getSnapshotId()); + return violationsDao.getViolations(resource, bucket.getSnapshotId()); } - } - return violations; + + return null; } public Dependency saveDependency(Dependency dependency) { |