From a1b777f7a44e95cec2a6787d09a381462cc184b5 Mon Sep 17 00:00:00 2001 From: Julien Lancelot Date: Wed, 29 May 2013 17:06:53 +0200 Subject: SONAR-4334 Using the "sonar.projectDate" property must lead to an analysis failure as soon as a more recent quality snapshot exist in the DB --- .../src/main/java/org/sonar/api/resources/Project.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'sonar-plugin-api/src') 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 0ddc4325077..89520b73811 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 @@ -202,17 +202,21 @@ public class Project extends Resource implements Component { * whether it's the latest analysis done on this project (displayed in sonar dashboard) or an analysis on a past revision. * * @since 2.0 + * @deprecated in 3.6. The analysis is now always the latest one (past analysis must be done in a chronological order). See http://jira.codehaus.org/browse/SONAR-4334 */ + @Deprecated public boolean isLatestAnalysis() { - return latestAnalysis; + return true; } /** * For internal use only. + * + * @deprecated in 3.6. It's not possible to do an analyse before the latest known quality snapshot. See http://jira.codehaus.org/browse/SONAR-4334 */ + @Deprecated public Project setLatestAnalysis(boolean b) { - this.latestAnalysis = b; - return this; + throw new UnsupportedOperationException("The analysis is always the latest one. Past analysis must be done in a chronological order."); } /** -- cgit v1.2.3