]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-4334 Do not generate exception when passing true to setLatestAnalysis()
authorJulien Lancelot <julien.lancelot@gmail.com>
Wed, 29 May 2013 15:14:14 +0000 (17:14 +0200)
committerJulien Lancelot <julien.lancelot@gmail.com>
Wed, 29 May 2013 15:14:14 +0000 (17:14 +0200)
sonar-plugin-api/src/main/java/org/sonar/api/resources/Project.java

index 89520b73811622899718c62aa8ed95fca54202d1..88ce3a94d3a9908e824447052ef87df653b77d64 100644 (file)
@@ -216,7 +216,10 @@ public class Project extends Resource implements Component {
    */
   @Deprecated
   public Project setLatestAnalysis(boolean b) {
-    throw new UnsupportedOperationException("The analysis is always the latest one. Past analysis must be done in a chronological order.");
+    if (b == false) {
+      throw new UnsupportedOperationException("The analysis is always the latest one. Past analysis must be done in a chronological order.");
+    }
+    return this;
   }
 
   /**