From: Julien Lancelot Date: Wed, 29 May 2013 15:14:14 +0000 (+0200) Subject: SONAR-4334 Do not generate exception when passing true to setLatestAnalysis() X-Git-Tag: 3.6~203 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=79a3c34591de315cbf89a618cb88eb856af6672f;p=sonarqube.git SONAR-4334 Do not generate exception when passing true to setLatestAnalysis() --- diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/resources/Project.java b/sonar-plugin-api/src/main/java/org/sonar/api/resources/Project.java index 89520b73811..88ce3a94d3a 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/resources/Project.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/resources/Project.java @@ -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; } /**