From 109d87e6481cd92cf65dfd274ef5a63800c6f72e Mon Sep 17 00:00:00 2001 From: Julien HENRY Date: Tue, 8 Apr 2014 16:07:58 +0200 Subject: [PATCH] Deprecate some constants that should have been deprecated in 4.2 --- .../src/main/java/org/sonar/api/resources/Scopes.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/resources/Scopes.java b/sonar-plugin-api/src/main/java/org/sonar/api/resources/Scopes.java index 1df626a3862..7f20c86647a 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/resources/Scopes.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/resources/Scopes.java @@ -57,17 +57,20 @@ public final class Scopes { /** * Types like Java classes/interfaces. Not persisted in database. + * @deprecated since 4.3 resources under FILE level are no more be supported since 4.2. */ + @Deprecated public static final String PROGRAM_UNIT = "PGU"; /** * Block units like methods, functions or Cobol paragraphs. + * @deprecated since 4.3 resources under FILE level are no more be supported since 4.2. */ + @Deprecated public static final String BLOCK_UNIT = "BLU"; public static final String[] SORTED_SCOPES = {PROJECT, DIRECTORY, FILE, PROGRAM_UNIT, BLOCK_UNIT}; - public static boolean isProject(final Resource resource) { return StringUtils.equals(PROJECT, resource.getScope()); } @@ -85,11 +88,17 @@ public final class Scopes { /** * A program unit can be a Java class. + * @deprecated since 4.3 resources under FILE level are no more be supported since 4.2. */ + @Deprecated public static boolean isProgramUnit(final Resource resource) { return StringUtils.equals(PROGRAM_UNIT, resource.getScope()); } + /** + * @deprecated since 4.3 resources under FILE level are no more be supported since 4.2. + */ + @Deprecated public static boolean isBlockUnit(final Resource resource) { return StringUtils.equals(BLOCK_UNIT, resource.getScope()); } -- 2.39.5